1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-22 02:12:44 +01:00

Use dummy dns API when it's not present

This commit is contained in:
Raymond Hill 2024-09-13 11:20:37 -04:00
parent d1db02b04c
commit 93042eced4
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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;