mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
desktop: handle MAC_APP_STORE is not defined error
This commit is contained in:
@@ -19,8 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
const { contextBridge, ipcRenderer } = require("electron");
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
contextBridge.exposeInMainWorld("os", MAC_APP_STORE ? "mas" : process.platform);
|
||||
let isMacAppStore =
|
||||
// eslint-disable-next-line no-undef
|
||||
process.env.NODE_ENV === "production" ? MAC_APP_STORE : false;
|
||||
contextBridge.exposeInMainWorld("os", isMacAppStore ? "mas" : process.platform);
|
||||
|
||||
// Expose protected methods that allow the renderer process to use
|
||||
// the ipcRenderer without exposing the entire object
|
||||
|
||||
Reference in New Issue
Block a user