mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #256] [import] readBoolean bugged when importing data #115
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @warrenberberd on GitHub (Dec 31, 2024).
Original GitHub issue: https://github.com/appy-one/acebase/issues/256
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}); };