mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: inspector context menu throwing an error (#29472)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ const isChromeDevTools = function (pageURL: string) {
|
||||
};
|
||||
|
||||
const assertChromeDevTools = function (contents: Electron.WebContents, api: string) {
|
||||
const pageURL = contents._getURL();
|
||||
const pageURL = contents.getURL();
|
||||
if (!isChromeDevTools(pageURL)) {
|
||||
console.error(`Blocked ${pageURL} from calling ${api}`);
|
||||
throw new Error(`Blocked ${api}`);
|
||||
|
||||
Reference in New Issue
Block a user