@unhead/vue 1.10.0-beta.3 → 1.10.0-beta.4
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.cjs +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -120,10 +120,15 @@ function useScript(_input, _options) {
|
|
|
120
120
|
script.status = status;
|
|
121
121
|
if (scope) {
|
|
122
122
|
const _registerCb = (key2, cb) => {
|
|
123
|
+
if (!script._cbs[key2]) {
|
|
124
|
+
cb(script.instance);
|
|
125
|
+
return () => {
|
|
126
|
+
};
|
|
127
|
+
}
|
|
123
128
|
let i = script._cbs[key2].push(cb);
|
|
124
129
|
const destroy = () => {
|
|
125
130
|
if (i) {
|
|
126
|
-
script._cbs[key2]
|
|
131
|
+
script._cbs[key2]?.splice(i - 1, 1);
|
|
127
132
|
i = null;
|
|
128
133
|
}
|
|
129
134
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -120,10 +120,15 @@ function useScript(_input, _options) {
|
|
|
120
120
|
script.status = status;
|
|
121
121
|
if (scope) {
|
|
122
122
|
const _registerCb = (key2, cb) => {
|
|
123
|
+
if (!script._cbs[key2]) {
|
|
124
|
+
cb(script.instance);
|
|
125
|
+
return () => {
|
|
126
|
+
};
|
|
127
|
+
}
|
|
123
128
|
let i = script._cbs[key2].push(cb);
|
|
124
129
|
const destroy = () => {
|
|
125
130
|
if (i) {
|
|
126
|
-
script._cbs[key2]
|
|
131
|
+
script._cbs[key2]?.splice(i - 1, 1);
|
|
127
132
|
i = null;
|
|
128
133
|
}
|
|
129
134
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.10.0-beta.
|
|
4
|
+
"version": "1.10.0-beta.4",
|
|
5
5
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"hookable": "^5.5.3",
|
|
69
|
-
"@unhead/
|
|
70
|
-
"unhead": "1.10.0-beta.
|
|
71
|
-
"
|
|
69
|
+
"@unhead/shared": "1.10.0-beta.4",
|
|
70
|
+
"@unhead/schema": "1.10.0-beta.4",
|
|
71
|
+
"unhead": "1.10.0-beta.4"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "unbuild .",
|