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

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2021-06-02 16:17:57 +09:00
committed by GitHub
parent 670ae438b9
commit 6362736703
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}`);