mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
SDA-3637 - disable InspectElement for prod (#1388)
This commit is contained in:
parent
9bad945bbc
commit
f6d66b36cc
@ -1,4 +1,5 @@
|
|||||||
import { BrowserWindow, clipboard, Menu, MenuItem, shell } from 'electron';
|
import { BrowserWindow, clipboard, Menu, MenuItem, shell } from 'electron';
|
||||||
|
import { isDevEnv } from '../common/env';
|
||||||
import { logger } from '../common/logger';
|
import { logger } from '../common/logger';
|
||||||
|
|
||||||
interface IContextMenuStringTable {
|
interface IContextMenuStringTable {
|
||||||
@ -445,6 +446,9 @@ export class ContextMenuBuilder {
|
|||||||
*/
|
*/
|
||||||
public addInspectElement(menu, menuInfo, needsSeparator = true) {
|
public addInspectElement(menu, menuInfo, needsSeparator = true) {
|
||||||
const target = this.getWebContents();
|
const target = this.getWebContents();
|
||||||
|
if (!isDevEnv) {
|
||||||
|
return menu;
|
||||||
|
}
|
||||||
if (needsSeparator) {
|
if (needsSeparator) {
|
||||||
this.addSeparator(menu);
|
this.addSeparator(menu);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user