diff options
author | hackademix | 2019-10-23 17:20:10 +0200 |
---|---|---|
committer | hackademix | 2019-10-25 23:19:48 +0100 |
commit | 810c607e6b4b050147c49a3affe2d28ac4f8fa0f (patch) | |
tree | 018367679d7fd20d1ccf4c2709e4838aada187ea /src/lib | |
parent | 51e115d3bcd2ad683f264e7d9c97347e0afac14e (diff) | |
download | noscript-810c607e6b4b050147c49a3affe2d28ac4f8fa0f.tar.gz noscript-810c607e6b4b050147c49a3affe2d28ac4f8fa0f.tar.xz noscript-810c607e6b4b050147c49a3affe2d28ac4f8fa0f.zip |
Consolidated missing endpoint error detection in Messages.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Messages.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Messages.js b/src/lib/Messages.js index 0a47c42..f33b621 100644 --- a/src/lib/Messages.js +++ b/src/lib/Messages.js @@ -65,6 +65,10 @@ return await browser.tabs.sendMessage(recipientInfo.tabId, args, opts); } return await browser.runtime.sendMessage(args); + }, + isMissingEndpoint(error) { + return error && error.message === + "Could not esablish connection. Receiving end does not exist."; } } } |