We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebbb3fb commit 0c15984Copy full SHA for 0c15984
standalone.js
@@ -3,11 +3,11 @@
3
const SerializerSelector = require('./index')
4
5
function StandaloneSerializer (options = { readMode: true }) {
6
- if (options.readMode === true && !options.restoreFunction) {
+ if (options.readMode === true && typeof options.restoreFunction !== 'function') {
7
throw new Error('You must provide a restoreFunction options when readMode ON')
8
}
9
10
- if (options.readMode !== true && !options.storeFunction) {
+ if (options.readMode !== true && typeof options.storeFunction !== 'function') {
11
throw new Error('You must provide a storeFunction options when readMode OFF')
12
13
0 commit comments