diff --git a/src/bootstrap-window.js b/src/bootstrap-window.js index c41965b30ae30c880ae9e7a9b4c47a496c51ac29..80145240039638649d579e2a3df13723ad996a9a 100644 --- a/src/bootstrap-window.js +++ b/src/bootstrap-window.js @@ -32,6 +32,12 @@ exports.load = function (modulePaths, resultCallback, options) { const args = parseURLQueryArgs(); const configuration = JSON.parse(args['config'] || '{}') || {}; + // Apply zoom level early to avoid glitches + const zoomLevel = configuration.zoomLevel; + if (typeof zoomLevel === 'number' && zoomLevel !== 0) { + webFrame.setZoomLevel(zoomLevel); + } + // Error handler // @ts-ignore process.on('uncaughtException', function (error) { @@ -51,12 +57,6 @@ exports.load = function (modulePaths, resultCallback, options) { // Enable ASAR support bootstrap.enableASARSupport(path.join(configuration.appRoot, 'node_modules')); - // Apply zoom level early to avoid glitches - const zoomLevel = configuration.zoomLevel; - if (typeof zoomLevel === 'number' && zoomLevel !== 0) { - webFrame.setZoomLevel(zoomLevel); - } - if (options && typeof options.canModifyDOM === 'function') { options.canModifyDOM(configuration); }