mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Use dummy dns API when it's not present
This commit is contained in:
parent
d1db02b04c
commit
93042eced4
1 changed files with 6 additions and 1 deletions
|
@ -26,7 +26,12 @@ import {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
const dnsAPI = browser.dns;
|
||||
const dnsAPI = browser.dns || {
|
||||
resolve() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
};
|
||||
|
||||
const isPromise = o => o instanceof Promise;
|
||||
const isResolvedObject = o => o instanceof Object &&
|
||||
o instanceof Promise === false;
|
||||
|
|
Loading…
Reference in a new issue