Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booleanize localstorage settings from older versions of LGV to avoid crash #3459

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

cmdcolin
Copy link
Collaborator

Fixes bug found by @carolinebridge-oicr when loading LGV with the localstorage populated with older "0"/"1" for settings instead of "true"/"false"

Git blame traces to here d509556#diff-16ff04395edd82556eb8f6df4a771c9d56a968b512fba86976d5ace75344d2cbL212

Error message @carolinebridge-oicr reported

react-dom.production.min.js:101 Uncaught Error: [mobx-state-tree] Error while converting `0` to `boolean`:

    value `0` is not assignable to type: `boolean` (Value is not a boolean).
    at pt (mobx-state-tree.module.js:3847:12)
    at Ge (mobx-state-tree.module.js:3440:15)
    at Ze (mobx-state-tree.module.js:3426:9)
    at t.value (mobx-state-tree.module.js:7105:17)
    at t.value (mobx-state-tree.module.js:7078:54)
    at mobx-state-tree.module.js:6130:42
    at mobx-state-tree.module.js:6328:64
    at Array.forEach (<anonymous>)
    at t.value (mobx-state-tree.module.js:6328:32)
    at t.value (mobx-state-tree.module.js:6129:18)

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jan 14, 2023
@cmdcolin cmdcolin changed the title Booleanize localstorage to properly handle settings from older versions of LGV Booleanize localstorage settings from older versions of LGV to avoid crash Jan 14, 2023
@cmdcolin cmdcolin added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Jan 14, 2023
@cmdcolin cmdcolin merged commit 8dc52ab into main Jan 14, 2023
@cmdcolin cmdcolin deleted the booleanize_inputs branch January 14, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant