Merge pull request #516 from Materialious/update/1.2.1

Fix platformDependentDefault
This commit is contained in:
Ward
2024-09-07 17:23:48 +12:00
committed by GitHub
+1 -1
View File
@@ -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;