Improved electron detection.
This commit is contained in:
parent
41eb9901d7
commit
618d583587
2 changed files with 2 additions and 2 deletions
|
@ -947,7 +947,7 @@ parse5322.parseAddressList = parseAddressListSimple;
|
||||||
|
|
||||||
// if electron is used, go back to non CommonJS
|
// if electron is used, go back to non CommonJS
|
||||||
//if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
|
//if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
|
||||||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined' && !(process && process.version && process.versions.electron)) {
|
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined' && !(window.process && window.process.version && window.process.versions.electron)) {
|
||||||
module.exports = parse5322;
|
module.exports = parse5322;
|
||||||
} else {
|
} else {
|
||||||
global.emailAddresses = parse5322;
|
global.emailAddresses = parse5322;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
// if electron is used, go back to non CommonJS
|
// if electron is used, go back to non CommonJS
|
||||||
//if ( typeof module === "object" && typeof module.exports === "object" ) {
|
//if ( typeof module === "object" && typeof module.exports === "object" ) {
|
||||||
if ( typeof module === "object" && typeof module.exports === "object" && !(process && process.version && process.versions.electron)) {
|
if ( typeof module === "object" && typeof module.exports === "object" && !(window.process && window.process.version && window.process.versions.electron)) {
|
||||||
// For CommonJS and CommonJS-like environments where a proper `window`
|
// For CommonJS and CommonJS-like environments where a proper `window`
|
||||||
// is present, execute the factory and get jQuery.
|
// is present, execute the factory and get jQuery.
|
||||||
// For environments that do not have a `window` with a `document`
|
// For environments that do not have a `window` with a `document`
|
||||||
|
|
Loading…
Reference in a new issue