From 27732938812333516196fcf5c1dd6e67fba4bae6 Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Wed, 9 Mar 2022 16:56:34 +0000 Subject: [PATCH] Fix broken destructuring in ClassifierContainer --- .../src/components/Classifier/ClassifierContainer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/lib-classifier/src/components/Classifier/ClassifierContainer.js b/packages/lib-classifier/src/components/Classifier/ClassifierContainer.js index e7189e599bb..a27aa0ca60e 100644 --- a/packages/lib-classifier/src/components/Classifier/ClassifierContainer.js +++ b/packages/lib-classifier/src/components/Classifier/ClassifierContainer.js @@ -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 @@ -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)