Browse Source

adjust

pull/15090/head
zombiej 6 years ago
committed by 偏右
parent
commit
9fcce59d70
  1. 21
      site/theme/template/Layout/index.jsx

21
site/theme/template/Layout/index.jsx

@ -19,6 +19,17 @@ if (typeof window !== 'undefined' && navigator.serviceWorker) {
}); });
} }
if (typeof window !== 'undefined') {
/* eslint-disable global-require */
require('../../static/style');
// Expose to iframe
window.react = React;
window['react-dom'] = ReactDOM;
window.antd = require('antd');
/* eslint-enable global-require */
// Error log statistic
window.addEventListener('error', function(e) { window.addEventListener('error', function(e) {
// Ignore ResizeObserver error // Ignore ResizeObserver error
if (e.message === 'ResizeObserver loop limit exceeded') { if (e.message === 'ResizeObserver loop limit exceeded') {
@ -31,16 +42,6 @@ if (process.env.NODE_ENV === 'production') {
LogRocket.init('kpuw4z/ant-design'); LogRocket.init('kpuw4z/ant-design');
setupLogRocketReact(LogRocket); setupLogRocketReact(LogRocket);
} }
if (typeof window !== 'undefined') {
/* eslint-disable global-require */
require('../../static/style');
// Expose to iframe
window.react = React;
window['react-dom'] = ReactDOM;
window.antd = require('antd');
/* eslint-enable global-require */
} }
let isMobile = false; let isMobile = false;

Loading…
Cancel
Save