File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -149,18 +149,16 @@ function getPlatform () {
149149 browser . name = matched . browser
150150 browser . platform = matched . platform
151151
152- if ( window && window . process && window . process . versions && window . process . versions . electron ) {
153- browser . electron = true
154- }
155- else if ( document . location . href . indexOf ( 'chrome-extension://' ) === 0 ) {
156- browser . chromeExt = true
157- }
158- else if (
159- window . _cordovaNative ||
160- window . cordova ||
161- document . location . href . indexOf ( 'http://' ) === - 1
162- ) {
163- browser . cordova = true
152+ if ( ! isSSR ) {
153+ if ( window . process && window . process . versions && window . process . versions . electron ) {
154+ browser . electron = true
155+ }
156+ else if ( document . location . href . indexOf ( 'chrome-extension://' ) === 0 ) {
157+ browser . chromeExt = true
158+ }
159+ else if ( window . _cordovaNative || window . cordova ) {
160+ browser . cordova = true
161+ }
164162 }
165163
166164 return browser
You can’t perform that action at this time.
0 commit comments