Skip to content

Commit bc69ea1

Browse files
committed
TASK: Disable concurrent change monitor in selection mode
It’s not required to poll for updates when we only select assets
1 parent 1e80a39 commit bc69ea1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Resources/Private/JavaScript/concurrent-editing/src/components/ConcurrentChangeMonitor.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ const ConcurrentChangeMonitor: React.FC = () => {
1515
const { refetch: refetchAssets } = useAssetsQuery();
1616

1717
useEffect(() => {
18+
// Prevent errors when the queries are not yet initialized
19+
if (!refetchAssets || !refetchAsset) {
20+
return;
21+
}
1822
changedAssets?.forEach((change) => {
1923
switch (change.type) {
2024
case 'ASSET_REPLACED':

Resources/Private/JavaScript/media-module/src/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const App = () => {
101101

102102
<InteractionDialogRenderer />
103103
<ClipboardWatcher />
104-
<ConcurrentChangeMonitor />
104+
{!selectionMode && <ConcurrentChangeMonitor />}
105105
</div>
106106
);
107107
};

0 commit comments

Comments
 (0)