perf: error show

This commit is contained in:
archer
2023-05-15 22:27:54 +08:00
parent e7d3a8e2e1
commit 371e0e36c6
10 changed files with 60 additions and 39 deletions

View File

@@ -78,6 +78,6 @@ export default Layout;
Layout.getInitialProps = ({ req }: any) => {
return {
isPcDevice: !/Mobile/.test(req ? req.headers['user-agent'] : navigator.userAgent)
isPcDevice: !/Mobile/.test(req?.headers?.['user-agent'])
};
};