mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Added additional check for node
If `process` is defined, but it has no `versions` property the check will fail with an error. The detection of node is not working properly. In my case I have embedded phaser into a vue-cli@3 application, which is technically node but has no `versions` property. This fixes the problem
This commit is contained in:
parent
c8bbea552d
commit
6d0b7e91ab
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ function init ()
|
|||
OS.cordova = true;
|
||||
}
|
||||
|
||||
if ((typeof process !== 'undefined') && (typeof process.versions.node !== 'undefined'))
|
||||
if (process && process.versions && process.versions.node)
|
||||
{
|
||||
OS.node = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue