Skip to content

Commit

Permalink
Fix initial mount of conflict detection reporter component
Browse files Browse the repository at this point in the history
  • Loading branch information
mlwilkerson committed Sep 6, 2021
1 parent b242668 commit e8cdcb9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions admin/src/ConflictDetectionScannerSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ])

Expand Down

0 comments on commit e8cdcb9

Please sign in to comment.