This commit is contained in:
Zoe Roux
2022-11-29 17:54:51 +09:00
parent ef0f0e7654
commit bde4f8b4c3
5 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import * as Font from "expo-font";
import React from "react";
import { Text, } from "react-native";
import { Text, Platform, } from "react-native";
import createIconSet from "./vendor/react-native-vector-icons/lib/create-icon-set";
import createIconButtonComponent from "./vendor/react-native-vector-icons/lib/icon-button";
export { DEFAULT_ICON_COLOR, DEFAULT_ICON_SIZE, } from "./vendor/react-native-vector-icons/lib/create-icon-set";
@@ -35,7 +35,7 @@ export default function (glyphMap, fontName, expoAssetId, fontStyle) {
if (__DEV__ && this.props.name && !(this.props.name in glyphMap)) {
console.warn(`"${this.props.name}" is not a valid icon name for family "${fontName}"`);
}
if (!this.state.fontIsLoaded) {
if (Platform.OS !== "web" && !this.state.fontIsLoaded) {
return <Text />;
}
return (<RNVIconComponent ref={(view) => {