Test for existence of browser.dns

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/780

browser.dns is not available before Firefox 60,
test for presence.
This commit is contained in:
Raymond Hill 2019-11-19 16:48:53 -05:00
parent 5a829b3e87
commit 02075ab97a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 2 additions and 1 deletions

View File

@ -167,7 +167,8 @@
if (
typeof list !== 'string' ||
list.length === 0 ||
list === 'unset'
list === 'unset' ||
browser.dns instanceof Object === false
) {
return null;
}