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

This commit is contained in:
Samuel Attard 2021-04-28 18:41:03 -07:00 committed by GitHub
parent c37c9adbe2
commit 791eddd541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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!));