Node detection: base on process instead of window (#911)
This commit is contained in:
parent
b035f2ea46
commit
c7fb8d8fe7
4
npm-shrinkwrap.json
generated
4
npm-shrinkwrap.json
generated
|
@ -7420,8 +7420,8 @@
|
|||
}
|
||||
},
|
||||
"web-stream-tools": {
|
||||
"version": "github:openpgpjs/web-stream-tools#84a497715c9df271a673f8616318264ab42ab3cc",
|
||||
"from": "github:openpgpjs/web-stream-tools#84a497715c9df271a673f8616318264ab42ab3cc",
|
||||
"version": "github:openpgpjs/web-stream-tools#3df197b8db4d4091783cd0160da7d61a3b7a8f3a",
|
||||
"from": "github:openpgpjs/web-stream-tools#3df197b8db4d4091783cd0160da7d61a3b7a8f3a",
|
||||
"dev": true
|
||||
},
|
||||
"websocket-driver": {
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
"pako": "^1.0.6",
|
||||
"seek-bzip": "github:openpgpjs/seek-bzip#6187fc025851d35c4e104a25ea15a10b9b8d6f7d",
|
||||
"tweetnacl": "github:openpgpjs/tweetnacl-js#1ef755f2b252a3e328ac739848d00e0dad76be2d",
|
||||
"web-stream-tools": "github:openpgpjs/web-stream-tools#84a497715c9df271a673f8616318264ab42ab3cc"
|
||||
"web-stream-tools": "github:openpgpjs/web-stream-tools#3df197b8db4d4091783cd0160da7d61a3b7a8f3a"
|
||||
},
|
||||
"dependencies": {
|
||||
"asn1.js": "^5.0.0",
|
||||
|
|
|
@ -585,7 +585,8 @@ export default {
|
|||
* Detect Node.js runtime.
|
||||
*/
|
||||
detectNode: function() {
|
||||
return typeof window === 'undefined';
|
||||
return typeof global.process === 'object' &&
|
||||
typeof global.process.versions === 'object';
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user