From f6d66b36ccaadba7b1a66f9b2fb9082fe5e7a5e1 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Wed, 13 Apr 2022 13:12:57 +0530 Subject: [PATCH] SDA-3637 - disable InspectElement for prod (#1388) --- src/app/context-menu-builder.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/context-menu-builder.ts b/src/app/context-menu-builder.ts index c31a51ab..b8409fce 100644 --- a/src/app/context-menu-builder.ts +++ b/src/app/context-menu-builder.ts @@ -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); }