From 1f5f9dc0b19af49e2641bfcf86ff2adb003c9712 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Tue, 23 Nov 2021 15:26:06 +0500 Subject: [PATCH] return true if platfroms is undefined --- apps/mobile/src/components/Announcements/functions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/mobile/src/components/Announcements/functions.js b/apps/mobile/src/components/Announcements/functions.js index a02ed7f68..27d0a86df 100644 --- a/apps/mobile/src/components/Announcements/functions.js +++ b/apps/mobile/src/components/Announcements/functions.js @@ -11,6 +11,7 @@ import {SubHeading} from './subheading'; import {Title} from './title'; export function allowedOnPlatform(platforms) { + if (!platforms) return true; return platforms.some(platform => allowedPlatforms.indexOf(platform) > -1); }