From ef57c39920dfc2dd654ed7acdec1f05ce1494809 Mon Sep 17 00:00:00 2001 From: leilzh Date: Wed, 11 Dec 2019 21:50:59 +0800 Subject: [PATCH] Remove the unused lufiles in notifications --- .../client/src/pages/notifications/useNotifications.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Composer/packages/client/src/pages/notifications/useNotifications.tsx b/Composer/packages/client/src/pages/notifications/useNotifications.tsx index 4d4b46e0ec..2e6d12720d 100644 --- a/Composer/packages/client/src/pages/notifications/useNotifications.tsx +++ b/Composer/packages/client/src/pages/notifications/useNotifications.tsx @@ -8,6 +8,7 @@ import { StoreContext } from '../../store'; import { replaceDialogDiagnosticLabel } from '../../utils'; import { INotification, DiagnosticSeverity } from './types'; +import { getReferredFiles } from './../../utils/luUtil'; export default function useNotifications(filter?: string) { const { state } = useContext(StoreContext); @@ -28,7 +29,7 @@ export default function useNotifications(filter?: string) { }); }); }); - luFiles.forEach(lufile => { + getReferredFiles(luFiles, dialogs).forEach(lufile => { lufile.diagnostics.map(diagnostic => { const location = `${lufile.id}.lu`; notifactions.push({