-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify common code for loading a second tree
There are two ways of loading a second tree: upon initial load / narrative slide progression (logic within `createStateFromQueryOrJSONs`) or via the sidebar "second tree" UI (logic within `createTreeTooState`). This commit aims to reduce the duplication of code between these functions, where possible given the current design. There is one behavioural change - the second method of loading a tree now no longer skips the `castIncorrectTypes` error correction function. Tangentially: the code in this file is fragile and the order of function calls is crucial. I hope the adoption of TS will improve resilience here.
- Loading branch information
1 parent
c11938d
commit 62b6dd2
Showing
1 changed file
with
51 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters