Browse Source

fix: provide no-op implementation of app.setUserModelId (#28915)

Samuel Attard 4 years ago
parent
commit
791eddd541
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/browser/api/app.ts

+ 3 - 0
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!));