SDA-3637 - disable InspectElement for prod (#1388)

This commit is contained in:
Kiran Niranjan 2022-04-13 13:12:57 +05:30 committed by GitHub
parent 9bad945bbc
commit f6d66b36cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
import { BrowserWindow, clipboard, Menu, MenuItem, shell } from 'electron';
import { isDevEnv } from '../common/env';
import { logger } from '../common/logger';
interface IContextMenuStringTable {
@ -445,6 +446,9 @@ export class ContextMenuBuilder {
*/
public addInspectElement(menu, menuInfo, needsSeparator = true) {
const target = this.getWebContents();
if (!isDevEnv) {
return menu;
}
if (needsSeparator) {
this.addSeparator(menu);
}