From 791eddd54111b2a7d0ba7eef2da59f565ec3d599 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 28 Apr 2021 18:41:03 -0700 Subject: [PATCH] fix: provide no-op implementation of app.setUserModelId (#28915) --- lib/browser/api/app.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/browser/api/app.ts b/lib/browser/api/app.ts index 301c0a49d9dc..4faf0d7dee3b 100644 --- a/lib/browser/api/app.ts +++ b/lib/browser/api/app.ts @@ -63,6 +63,9 @@ Object.defineProperty(app, 'applicationMenu', { return execFile !== 'electron'; })(); +// The native implementation is not provided on non-windows platforms +app.setAppUserModelId = app.setAppUserModelId || (() => {}); + app._setDefaultAppPaths = (packagePath) => { // Set the user path according to application's name. app.setPath('userData', path.join(app.getPath('appData'), app.name!));