Replace fbjs canUseDom with inline module

Close #2336
Ref #2333
This commit is contained in:
Cody Rathor
2022-07-08 11:35:50 -07:00
committed by Nicolas Gallagher
parent 80a72c327c
commit 8c365d9892
22 changed files with 42 additions and 48 deletions
+5 -2
View File
@@ -1,9 +1,12 @@
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';
import { Dimensions, Platform } from 'react-native';
const baseFontSize = 14;
const baseUnit = 1.3125;
const { canUseDOM } = ExecutionEnvironment;
const canUseDOM = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
const createPlatformLength = (multiplier) =>
Platform.select({