From 96645a21b1d59ee4411e6f764b5d00986b836efb Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 16 Jun 2020 05:29:37 -0700 Subject: [PATCH] Fixed silent error on notification side-effect Summary: Fixed silent error on showing deprecated format notification Reviewed By: jknoxville Differential Revision: D22066427 fbshipit-source-id: ae721aaa45e111df3cf8d8344554efac54b6d2ec --- desktop/app/src/dispatcher/notifications.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/desktop/app/src/dispatcher/notifications.tsx b/desktop/app/src/dispatcher/notifications.tsx index 305966174..0343a5ef9 100644 --- a/desktop/app/src/dispatcher/notifications.tsx +++ b/desktop/app/src/dispatcher/notifications.tsx @@ -190,7 +190,13 @@ export default (store: Store, logger: Logger) => { closeAfter: 10000, pluginNotification: n, }); - logger.track('usage', 'native-notification', n.notification); + logger.track('usage', 'native-notification', { + ...n.notification, + message: + typeof n.notification.message === 'string' + ? n.notification.message + : '', + }); } }); },