|
|
@@ -3,8 +3,6 @@ import { notification, Button, message } from 'antd';
|
|
|
import { formatMessage } from 'umi-plugin-react/locale';
|
|
|
import defaultSettings from './defaultSettings';
|
|
|
|
|
|
-window.React = React;
|
|
|
-
|
|
|
const { pwa } = defaultSettings;
|
|
|
// if pwa is true
|
|
|
if (pwa) {
|
|
|
@@ -58,4 +56,9 @@ if (pwa) {
|
|
|
onClose: async () => {},
|
|
|
});
|
|
|
});
|
|
|
+} else if ('serviceWorker' in navigator) {
|
|
|
+ // eslint-disable-next-line compat/compat
|
|
|
+ navigator.serviceWorker.ready.then(registration => {
|
|
|
+ registration.unregister();
|
|
|
+ });
|
|
|
}
|