Skip to content

Commit 0c15984

Browse files
EommUzlopak
andauthored
Apply suggestions from code review
Co-authored-by: Uzlopak <[email protected]>
1 parent ebbb3fb commit 0c15984

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

standalone.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
const SerializerSelector = require('./index')
44

55
function StandaloneSerializer (options = { readMode: true }) {
6-
if (options.readMode === true && !options.restoreFunction) {
6+
if (options.readMode === true && typeof options.restoreFunction !== 'function') {
77
throw new Error('You must provide a restoreFunction options when readMode ON')
88
}
99

10-
if (options.readMode !== true && !options.storeFunction) {
10+
if (options.readMode !== true && typeof options.storeFunction !== 'function') {
1111
throw new Error('You must provide a storeFunction options when readMode OFF')
1212
}
1313

0 commit comments

Comments
 (0)