Skip to content

Commit

Permalink
Fix broken destructuring in ClassifierContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Mar 11, 2022
1 parent 3777f8d commit 2773293
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ export default function ClassifierContainer({
const { classifierStore, loaded } = useHydratedStore(storeOptions, cachePanoptesData, `fem-classifier-${project.id}`)

useEffect(function onLoad() {
const { classifications, subjects, workflows } = classifierStore
/*
If the project uses session storage, we need to do some
processing of the store after it loads.
*/
if (cachePanoptesData && loaded) {
const { subjects, workflows } = classifierStore
if (!workflows.active?.prioritized) {
/*
In this case, we delete the saved queue so that
Expand All @@ -98,6 +98,7 @@ export default function ClassifierContainer({
their defaults.
*/
if (loaded) {
const { classifications, subjects } = classifierStore
console.log('setting classifier event callbacks')
classifierStore.setOnAddToCollection(onAddToCollection)
classifications.setOnComplete(onCompleteClassification)
Expand Down

0 comments on commit 2773293

Please sign in to comment.