diff --git a/manifest.json b/manifest.json index ed169dc..515ebd1 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "JDN", "description": "", "devtools_page": "index.html", - "version": "3.0.41", + "version": "3.0.42", "permissions": [ "activeTab", "tabs", diff --git a/package-lock.json b/package-lock.json index 1e81a43..9aa708e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "jdi-react-extension", - "version": "3.0.40", + "version": "3.0.42", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2781750..1d3e0a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jdi-react-extension", - "version": "3.0.41", + "version": "3.0.42", "description": "jdi react extension", "scripts": { "start": "npm run webpack", diff --git a/src/js/blocks/autoFind/autoFindProvider/connector.js b/src/js/blocks/autoFind/autoFindProvider/connector.js index 291c6a8..a5868d6 100644 --- a/src/js/blocks/autoFind/autoFindProvider/connector.js +++ b/src/js/blocks/autoFind/autoFindProvider/connector.js @@ -2,7 +2,7 @@ class Connector { constructor() { this.tab = null; this.port = null; - this.getPageId(); + this.getTab(); this.onerror = null; } @@ -12,7 +12,7 @@ class Connector { else throw error; } - getPageId() { + getTab() { chrome.tabs.query({ active: true, currentWindow: true }, (res) => { if (res && res[0]) this.tab = res[0]; else this.handleError("Connector: active page id is not available."); @@ -43,6 +43,7 @@ class Connector { changeinfo.status === "complete" && this.tab.id === tabId ) { + this.getTab(); if (this.port) { this.port.disconnect(); this.port = null; diff --git a/src/js/blocks/autoFind/tests/autoFind.test.js b/src/js/blocks/autoFind/tests/autoFind.test.js index 6ed344c..f6643ed 100644 --- a/src/js/blocks/autoFind/tests/autoFind.test.js +++ b/src/js/blocks/autoFind/tests/autoFind.test.js @@ -53,7 +53,7 @@ describe("AutoFind Identify functionality", () => { ); jest.clearAllMocks(); - jest.spyOn(connector, "getPageId").mockReturnValue( + jest.spyOn(connector, "getTab").mockReturnValue( (() => { connector.tab = { id: "42" }; })()