mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-16 15:33:38 +01:00
Use dummy dns API when it's not present
This commit is contained in:
parent
d1db02b04c
commit
93042eced4
@ -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 New Issue
Block a user