return true if platfroms is undefined

This commit is contained in:
ammarahm-ed
2021-11-23 15:26:06 +05:00
parent 63ae46fcb4
commit 1f5f9dc0b1

View File

@@ -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);
}