Check existence of navigator
before using it (#1475)
This commit is contained in:
parent
f54b133085
commit
f93f59e2e5
|
@ -430,7 +430,7 @@ const util = {
|
||||||
return os.cpus().length;
|
return os.cpus().length;
|
||||||
}
|
}
|
||||||
|
|
||||||
return navigator.hardwareConcurrency || 1;
|
return (typeof navigator !== 'undefined' && navigator.hardwareConcurrency) || 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
isEmailAddress: function(data) {
|
isEmailAddress: function(data) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user