From fd74b95dbf59e50bf6b3c8f93eec9aafb753b926 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 28 Jun 2021 16:57:07 -0700 Subject: [PATCH] Update if/else error --- src/libs/UnreadIndicatorUpdater/updateUnread/index.ios.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/UnreadIndicatorUpdater/updateUnread/index.ios.js b/src/libs/UnreadIndicatorUpdater/updateUnread/index.ios.js index 43d86f285873..16f102622c13 100644 --- a/src/libs/UnreadIndicatorUpdater/updateUnread/index.ios.js +++ b/src/libs/UnreadIndicatorUpdater/updateUnread/index.ios.js @@ -9,8 +9,9 @@ import {UrbanAirship} from 'urbanairship-react-native'; function updateUnread(totalCount) { if (totalCount === -1) { UrbanAirship.setBadgeNumber(1); + } else { + UrbanAirship.setBadgeNumber(totalCount); } - UrbanAirship.setBadgeNumber(totalCount); } export default updateUnread;