aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-01 09:31:19 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-01 09:31:19 -0700
commit8dbfbcd6a5b7c9356c335debec28e70cd3952cb2 (patch)
tree5516cf946c8fd426be1b5d8a66f7e1fdd131bb7c
parent4e61ae214d7c9c54851261734837521f2f77b4e5 (diff)
downloadtrackermap-web-8dbfbcd6a5b7c9356c335debec28e70cd3952cb2.tar.gz
trackermap-web-8dbfbcd6a5b7c9356c335debec28e70cd3952cb2.tar.bz2
trackermap-web-8dbfbcd6a5b7c9356c335debec28e70cd3952cb2.zip
Fix firebase token removal
-rw-r--r--modern/src/common/components/BottomMenu.js2
1 files changed, 1 insertions, 1 deletions
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}`, {