diff --git a/lib/common/asar.js b/lib/common/asar.js index 0891669f801a..8132e1bb7248 100644 --- a/lib/common/asar.js +++ b/lib/common/asar.js @@ -10,14 +10,9 @@ // Cache asar archive objects. const cachedArchives = {} + const envNoAsar = process.env.ELECTRON_NO_ASAR && process.type !== 'browser' && process.type !== 'renderer' const isAsarDisabled = function () { - if (process.noAsar) { - return true - } - if (process.env.ELECTRON_NO_ASAR && process.type !== 'browser' && process.type !== 'renderer') { - return true - } - return false + return process.noAsar || envNoAsar } const getOrCreateArchive = function (p) {