2020-08-10 12:35:19 +00:00
|
|
|
/**
|
2020-08-13 08:31:15 +00:00
|
|
|
* Detect Electron renderer / nwjs process, which is node, but we should
|
2020-08-10 12:35:19 +00:00
|
|
|
* treat as a browser.
|
|
|
|
*/
|
|
|
|
|
2020-08-13 08:31:15 +00:00
|
|
|
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
|
|
module.exports = require('./browser.js');
|
2020-08-10 12:35:19 +00:00
|
|
|
} else {
|
2020-08-13 08:31:15 +00:00
|
|
|
module.exports = require('./node.js');
|
2020-08-10 12:35:19 +00:00
|
|
|
}
|