You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
353 B
JavaScript
12 lines
353 B
JavaScript
2 years ago
|
exports.require = function () {
|
||
|
if (typeof process === "object" && process.versions && process.versions["electron"]) {
|
||
|
try {
|
||
|
const originalFs = require("original-fs");
|
||
|
if (Object.keys(originalFs).length > 0) {
|
||
|
return originalFs;
|
||
|
}
|
||
|
} catch (e) {}
|
||
|
}
|
||
|
return require("fs");
|
||
|
};
|