File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33const SerializerSelector = require ( './index' )
44
55function StandaloneSerializer ( options = { readMode : true } ) {
6- if ( options . readMode === true && ! options . restoreFunction ) {
7- throw new Error ( 'You must provide a restoreFunction options when readMode ON' )
6+ if ( options . readMode === true && typeof options . restoreFunction !== 'function' ) {
7+ throw new Error ( 'You must provide a function for the restoreFunction-option when readMode ON' )
88 }
99
1010 if ( options . readMode !== true && ! options . storeFunction ) {
11- throw new Error ( 'You must provide a storeFunction options when readMode OFF' )
11+ throw new Error ( 'You must provide a function for the restoreFunction-option when readMode OFF' )
1212 }
1313
1414 if ( options . readMode === true ) {
You can’t perform that action at this time.
0 commit comments