@antv/dumi-theme-antv 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/slots/utils.js +3 -10
- package/package.json +1 -1
package/dist/slots/utils.js
CHANGED
|
@@ -25,16 +25,9 @@ function _ping() {
|
|
|
25
25
|
});
|
|
26
26
|
network = new Promise(function (resolve) {
|
|
27
27
|
var url = 'https://private-a' + 'lipay' + 'objects.alip' + 'ay.com/alip' + 'ay-rmsdeploy-image/rmsportal/RKuAiriJqrUhyqW.png';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
resolve('responded');
|
|
32
|
-
};
|
|
33
|
-
img.onerror = function () {
|
|
34
|
-
img.src = '';
|
|
35
|
-
resolve('error');
|
|
36
|
-
};
|
|
37
|
-
img.src = url;
|
|
28
|
+
fetch(url).then(function (resp) {
|
|
29
|
+
return resolve(resp.status === 200 ? 'responded' : 'error');
|
|
30
|
+
});
|
|
38
31
|
});
|
|
39
32
|
return _context.abrupt("return", Promise.race([timeout, network]));
|
|
40
33
|
case 3:
|