From e8cdcb926f4b379f9e7934e882cd4014d67ceb7a Mon Sep 17 00:00:00 2001 From: Mike Wilkerson <11575183+mlwilkerson@users.noreply.github.com> Date: Mon, 6 Sep 2021 10:19:32 -0700 Subject: [PATCH] Fix initial mount of conflict detection reporter component --- admin/src/ConflictDetectionScannerSection.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/src/ConflictDetectionScannerSection.js b/admin/src/ConflictDetectionScannerSection.js index 00be3be32..898e96701 100644 --- a/admin/src/ConflictDetectionScannerSection.js +++ b/admin/src/ConflictDetectionScannerSection.js @@ -20,11 +20,14 @@ export default function ConflictDetectionScannerSection() { useEffect(() => { if(showConflictDetectionReporter && !isConflictDetectionReporterMounted()) { - mountConflictDetectionReporter({ - report: params => store.dispatch(reportDetectedConflicts(params)), - store, - now: true - }) + // We are not setting up the reporting hook, because the conflict scanner + // script is not actually going to run when it's initially activated from + // this view. The conflict scanner box will appear to alert the user, + // but the actual functionality will not be enabled until the next page + // load, when the conflict detection JavaScript will be enqueued and loaded + // in the page. + + mountConflictDetectionReporter(store) } }, [ showConflictDetectionReporter, store ])