fix: inspector context menu throwing an error (#29436)

This commit is contained in:
Shelley Vohr 2021-06-02 05:39:48 +02:00 committed by GitHub
parent dee4c4b908
commit 3b75549511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -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}`);