Browse Source

adjust

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

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

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

Loading…
Cancel
Save