Quellcode durchsuchen

feat: 处理报错

huangzhichao vor 1 Jahr
Ursprung
Commit
56d2d8446a
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/plugin/components/custom/index.tsx

+ 1 - 1
src/plugin/components/custom/index.tsx

@@ -168,7 +168,7 @@ function YLQCustom(props: PropsWithChildren<CustomPropsType>) {
       adType: ownAdSystemType
     } = adData
 
-    const userCode = Taro.$global.userCode || Taro.getStorageSync('userCode') || ''
+    const userCode = Taro?.$global?.userCode || Taro.getStorageSync('userCode') || ''
 
     return {
       adpCode: trafficCode,