Commit 8522e521 authored by Dave Vandyke's avatar Dave Vandyke 🐈

Refs #18 - Ensure browser.webRequest is thruthy before using it

parent dd810fa1
Pipeline #64669280 passed with stages
in 8 minutes and 8 seconds
......@@ -297,7 +297,11 @@ if (!("values" in Object))
// we can obtain the list of accepted resource types from the error message
// when creating an onBeforeRequest event listener with an unsupported resource
// type.
if ("webRequest" in browser && !("ResourceType" in browser.webRequest))
//
// Note: that while `browser.webRequest` is `undefined` for content scripts,
// with Firefox for Android `"webRequest" in browser` is actually `true`!
// See https://bugzil.la/1556773
if (browser.webRequest && !("ResourceType" in browser.webRequest))
{
try
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment