From 6fbc33e4abdd8ad0f61c8d9114050a0d55d12d2a Mon Sep 17 00:00:00 2001 From: WardPearce Date: Sat, 7 Sep 2024 17:20:33 +1200 Subject: [PATCH] Fix platformDependentDefault --- materialious/src/lib/store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/materialious/src/lib/store.ts b/materialious/src/lib/store.ts index 2b7f59ce..9575f53f 100644 --- a/materialious/src/lib/store.ts +++ b/materialious/src/lib/store.ts @@ -8,7 +8,7 @@ import type { TitleCase } from './misc'; function platformDependentDefault(givenValue: any, defaultValue: any): any { - if (typeof givenValue !== 'undefined' || typeof givenValue !== null) { + if (typeof givenValue !== 'undefined' && typeof givenValue !== null) { return givenValue; } else if (defaultValue && Capacitor.getPlatform() !== 'web') { return defaultValue;