From 8dbfbcd6a5b7c9356c335debec28e70cd3952cb2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 1 Sep 2022 09:31:19 -0700 Subject: Fix firebase token removal --- modern/src/common/components/BottomMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern') diff --git a/modern/src/common/components/BottomMenu.js b/modern/src/common/components/BottomMenu.js index 68ccf056..e2b75959 100644 --- a/modern/src/common/components/BottomMenu.js +++ b/modern/src/common/components/BottomMenu.js @@ -59,7 +59,7 @@ const BottomMenu = () => { ...user, attributes: { ...user.attributes, - notificationTokens: tokens.filter((it) => it !== notificationToken).join(','), + notificationTokens: tokens.length > 1 ? tokens.filter((it) => it !== notificationToken).join(',') : undefined, }, }; await fetch(`/api/users/${user.id}`, { -- cgit v1.2.3