huangzhichao 1 рік тому
батько
коміт
56d2d8446a
1 змінених файлів з 1 додано та 1 видалено
  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,