hn-map 1.0.6 → 1.0.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/index.js +3 -3
- package/package.json +2 -2
- package/src/index.js +3 -4
package/dist/index.js
CHANGED
|
@@ -3651,17 +3651,17 @@
|
|
|
3651
3651
|
_defineProperty(hnMap, "allowConstruction", false);
|
|
3652
3652
|
var loadResource = function loadResource(path, type) {
|
|
3653
3653
|
return new Promise(function (resolve, reject) {
|
|
3654
|
-
|
|
3654
|
+
console.log(path, type, 222222);
|
|
3655
3655
|
if (type === 'css') {
|
|
3656
3656
|
var link = document.createElement('link');
|
|
3657
3657
|
link.rel = 'stylesheet';
|
|
3658
|
-
link.href =
|
|
3658
|
+
link.href = path;
|
|
3659
3659
|
link.onload = resolve;
|
|
3660
3660
|
link.onerror = reject;
|
|
3661
3661
|
document.head.appendChild(link);
|
|
3662
3662
|
} else {
|
|
3663
3663
|
var script = document.createElement('script');
|
|
3664
|
-
script.src =
|
|
3664
|
+
script.src = path;
|
|
3665
3665
|
script.onload = resolve;
|
|
3666
3666
|
script.onerror = reject;
|
|
3667
3667
|
document.body.appendChild(script);
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -89,18 +89,17 @@ export default class hnMap {
|
|
|
89
89
|
const loadResource = (path, type) => {
|
|
90
90
|
return new Promise((resolve, reject) => {
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
console.log(path,type,222222)
|
|
94
93
|
if (type === 'css') {
|
|
95
94
|
const link = document.createElement('link')
|
|
96
95
|
link.rel = 'stylesheet'
|
|
97
|
-
link.href =
|
|
96
|
+
link.href = path
|
|
98
97
|
link.onload = resolve;
|
|
99
98
|
link.onerror = reject;
|
|
100
99
|
document.head.appendChild(link)
|
|
101
100
|
} else {
|
|
102
101
|
const script = document.createElement('script')
|
|
103
|
-
script.src =
|
|
102
|
+
script.src = path
|
|
104
103
|
script.onload = resolve;
|
|
105
104
|
script.onerror = reject;
|
|
106
105
|
document.body.appendChild(script)
|