kaori 4 лет назад
Родитель
Сommit
f14754d870
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/server/models/in-app-notification.ts

+ 2 - 2
packages/app/src/server/models/in-app-notification.ts

@@ -139,7 +139,7 @@ export default (crowi: Crowi) => {
 
     const inAppNotification = await InAppNotification.findOneAndUpdate(query, parameters, options);
 
-    if (inAppNotification) {
+    if (inAppNotification != null) {
       commentEvent.emit('update', inAppNotification.user);
     }
 
@@ -174,7 +174,7 @@ export default (crowi: Crowi) => {
     const options = { new: true };
 
     const inAppNotification = await InAppNotification.findOneAndUpdate(query, parameters, options);
-    if (inAppNotification) {
+    if (inAppNotification != null) {
       commentEvent.emit('update', inAppNotification.user);
     }
     return inAppNotification;