From 0cdcb7b5177b72be1b34de6be48305f5cf40c033 Mon Sep 17 00:00:00 2001 From: phobal Date: Tue, 15 Jan 2019 10:19:43 +0800 Subject: [PATCH] Fix: win platform cannot load flash plugin, block it on win --- app/main.dev.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/main.dev.js b/app/main.dev.js index 1e8bbe6..d7798e4 100644 --- a/app/main.dev.js +++ b/app/main.dev.js @@ -11,7 +11,6 @@ * @flow */ import { app, BrowserWindow, ipcMain } from 'electron'; -import MenuBuilder from './menu'; let mainWindow = null; @@ -41,7 +40,7 @@ const installExtensions = async () => { }; // Try to append Pepper flash. See https://github.com/electron/electron/blob/master/docs/tutorial/using-pepper-flash-plugin.md -if (app.getPath("pepperFlashSystemPlugin")) { +if (process.platform === 'darwin' && app.getPath("pepperFlashSystemPlugin")) { app.commandLine.appendSwitch( "ppapi-flash-path", app.getPath("pepperFlashSystemPlugin")