diff --git a/utils/baseRequest.js b/utils/baseRequest.js index c90007b..b6fd476 100644 --- a/utils/baseRequest.js +++ b/utils/baseRequest.js @@ -11,7 +11,10 @@ export default function baseRequest() { b_ch: "h5", b_ts: b_ts, b_token: token, - b_did: navigator?.userAgent.slice(0,32), + b_did: + typeof window !== "undefined" && + typeof window.navigator !== "undefined" && + navigator?.userAgent.slice(0, 32), }; // console.log("baseRequest",baseRequest) return baseRequest;