diff options
| author | Alex Yatskov <FooSoft@users.noreply.github.com> | 2019-08-26 17:26:30 -0700 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-26 17:26:30 -0700 | 
| commit | 7bf215617c9e54228bd5f5fe44b29f7b99de1abc (patch) | |
| tree | a12703b80141d99e2003d832eab95cb61c1d8cc8 /ext/fg/js | |
| parent | 6c3671b3d98896ea710d70927024db4d2cbbad06 (diff) | |
| parent | c49f3c78383350b250c1dd823559bb8231f76e54 (diff) | |
Merge pull request #187 from toasted-nutbread/suppress-runtime-lasterror-messages
Suppress messages about unchecked runtime.lastError
Diffstat (limited to 'ext/fg/js')
| -rw-r--r-- | ext/fg/js/util.js | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/ext/fg/js/util.js b/ext/fg/js/util.js index 954b3988..7518beb5 100644 --- a/ext/fg/js/util.js +++ b/ext/fg/js/util.js @@ -27,6 +27,7 @@ function utilInvoke(action, params={}) {      return new Promise((resolve, reject) => {          try {              chrome.runtime.sendMessage({action, params}, (response) => { +                utilCheckLastError(chrome.runtime.lastError);                  if (response !== null && typeof response === 'object') {                      if (response.error) {                          reject(response.error); @@ -43,3 +44,7 @@ function utilInvoke(action, params={}) {          }      });  } + +function utilCheckLastError(e) { +    // NOP +} |