-
-
Notifications
You must be signed in to change notification settings - Fork 30
Description
import backup file fail with error :
Error: Expected true or false at index
at readBoolean (./node_modules/acebase/dist/cjs/storage/index.js:1718:19)
Due to function :
const readBoolean = async () => { if (state.data[state.index] === 't') { await consumeToken('true'); } else if (state.data[state.index] === 'f') { await consumeToken('false'); } throw new Error(
Expected true or false at index ${state.offset + state.index}); };
missing "return" clause.
Corrected with :
const readBoolean = async () => { if (state.data[state.index] === 't') { await consumeToken('true'); return true; } else if (state.data[state.index] === 'f') { await consumeToken('false'); return false; } throw new Error(
Expected true or false at index ${state.offset + state.index}); };