File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import requirePolyfills from 'common/lib/load-dynamic-polyfills';
1414import 'normalize.css' ;
1515import 'common/lib/global.css' ;
1616import theme from 'common/lib/theme' ;
17- import 'subworkers ';
17+ import { isSafari } from 'common/lib/utils/platform ';
1818
1919// eslint-disable-next-line
2020import * as child_process from 'node-services/lib/child_process' ;
@@ -106,6 +106,10 @@ function boot() {
106106 window . controller = controller ;
107107 }
108108
109+ if ( isSafari ) {
110+ import ( 'subworkers' ) ;
111+ }
112+
109113 const rootEl = document . getElementById ( 'root' ) ;
110114
111115 const showNotification = ( message , type ) =>
Original file line number Diff line number Diff line change 11export const isIOS =
22 typeof navigator !== 'undefined' &&
33 ! ! navigator . platform . match ( / ( i P h o n e | i P o d | i P a d ) / i) ;
4+ export const isSafari =
5+ typeof navigator !== 'undefined' &&
6+ / ^ ( (? ! c h r o m e | a n d r o i d ) .) * s a f a r i / i. test ( navigator . userAgent ) ;
47export const isMac =
58 typeof navigator !== 'undefined' &&
6- ( isIOS || ! ! navigator . platform . match ( / M a c / i) ) ;
9+ ( isIOS || ! ! navigator . platform . match ( / M a c / i) ) ;
You can’t perform that action at this time.
0 commit comments