@vueuse/head
Advanced tools
Comparing version 0.7.4 to 0.7.5
@@ -113,3 +113,3 @@ var __create = Object.create; | ||
for (const n of names) { | ||
const value = typeof props.getAttribute === "function" ? props.getAttribute(n) : props[n]; | ||
const value = typeof props.getAttribute === "function" ? props.hasAttribute(n) ? props.getAttribute(n) : void 0 : props[n]; | ||
if (value !== void 0) { | ||
@@ -193,3 +193,3 @@ return { name: n, value }; | ||
if (headCountEl) { | ||
for (let i = 0, j = headCountEl.previousElementSibling; i < headCount; i++, j = j.previousElementSibling) { | ||
for (let i = 0, j = headCountEl.previousElementSibling; i < headCount; i++, j = (j == null ? void 0 : j.previousElementSibling) || null) { | ||
if (((_a = j == null ? void 0 : j.tagName) == null ? void 0 : _a.toLowerCase()) === type) { | ||
@@ -221,10 +221,2 @@ oldElements.push(j); | ||
newElements.forEach((t) => { | ||
var _a2; | ||
const key = getTagKey(t); | ||
if (key) { | ||
const uncontrolled = head.querySelector(`${t.tagName.toLowerCase()}[${key.name}="${key.value}"]`); | ||
if (uncontrolled) { | ||
(_a2 = uncontrolled.parentNode) == null ? void 0 : _a2.removeChild(uncontrolled); | ||
} | ||
} | ||
head.insertBefore(t, headCountEl); | ||
@@ -231,0 +223,0 @@ }); |
{ | ||
"name": "@vueuse/head", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"license": "MIT", | ||
@@ -25,3 +25,2 @@ "description": "Document head manager for Vue 3. SSR ready.", | ||
"example": "vite example", | ||
"release": "shipjs prepare", | ||
"build": "tsup src/index.ts --format esm,cjs --dts", | ||
@@ -73,2 +72,3 @@ "prepublishOnly": "npm run build", | ||
"husky": "^4.3.8", | ||
"kanpai": "^0.10.1", | ||
"lint-staged": "^10.5.3", | ||
@@ -75,0 +75,0 @@ "node-fetch": "^2.6.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32572
23
844