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

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
trop[bot]
2021-04-29 09:56:20 +02:00
committed by GitHub
parent bf9dfa8247
commit 87d3530d1b

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