diff --git a/client/src/builtin/ReactDevtoolsModule.js b/client/src/builtin/ReactDevtoolsModule.js index fc3558f8..7ff509b6 100644 --- a/client/src/builtin/ReactDevtoolsModule.js +++ b/client/src/builtin/ReactDevtoolsModule.js @@ -39,13 +39,15 @@ export default new class ReactDevtoolsModule extends BuiltinModule { devToolsOpened() { electron.remote.BrowserWindow.removeDevToolsExtension('React Developer Tools'); electron.webFrame.registerURLSchemeAsPrivileged('chrome-extension'); - const v = electron.remote.BrowserWindow.addDevToolsExtension(path.resolve(Globals.getPath('ext'), 'extensions', 'rdt')); - if (v !== undefined) { - Toasts.success(v + ' Installed'); - return; - } else { + try { + const res = electron.remote.BrowserWindow.addDevToolsExtension(path.resolve(Globals.getPath('ext'), 'extensions', 'rdt')); + if (res !== undefined) { + Toasts.success(res + ' Installed'); + return; + } + Toasts.error('React Developer Tools install failed'); + } catch (err) { Toasts.error('React Developer Tools install failed'); } - } } diff --git a/client/src/builtin/VueDevToolsModule.js b/client/src/builtin/VueDevToolsModule.js index 9a23c24f..e5d8767b 100644 --- a/client/src/builtin/VueDevToolsModule.js +++ b/client/src/builtin/VueDevToolsModule.js @@ -39,13 +39,15 @@ export default new class VueDevtoolsModule extends BuiltinModule { devToolsOpened() { electron.remote.BrowserWindow.removeDevToolsExtension('Vue.js devtools'); electron.webFrame.registerURLSchemeAsPrivileged('chrome-extension'); - const v = electron.remote.BrowserWindow.addDevToolsExtension(path.resolve(Globals.getPath('ext'), 'extensions', 'vdt')); - if (v !== undefined) { - Toasts.success(v + ' Installed'); - return; - } else { + try { + const res = electron.remote.BrowserWindow.addDevToolsExtension(path.resolve(Globals.getPath('ext'), 'extensions', 'vdt')); + if (res !== undefined) { + Toasts.success(res + ' Installed'); + return; + } + Toasts.error('Vue.js devtools install failed'); + } catch (err) { Toasts.error('Vue.js devtools install failed'); } - } } diff --git a/client/src/data/user.settings.default.json b/client/src/data/user.settings.default.json index 58a1226a..6dfd8c90 100644 --- a/client/src/data/user.settings.default.json +++ b/client/src/data/user.settings.default.json @@ -68,14 +68,14 @@ "id": "react-devtools", "type": "bool", "text": "React Developer Tools", - "hint": "Enable/Disable React developer tools", + "hint": "Place extension in ext/extensions", "value": false }, { "id": "vue-devtools", "type": "bool", "text": "Vue Developer Tools", - "hint": "Enable/Disable Vue developer tools", + "hint": "Place extension in ext/extensions", "value": false } ]