@solidjs/meta
Advanced tools
Comparing version 0.28.1 to 0.28.2
import { mergeProps as _$mergeProps } from "solid-js/web"; | ||
import { createComponent as _$createComponent } from "solid-js/web"; | ||
import { createContext, createRenderEffect, createUniqueId, onCleanup, useContext } from "solid-js"; | ||
import { createContext, createRenderEffect, createUniqueId, onCleanup, sharedConfig, useContext } from "solid-js"; | ||
import { isServer, spread } from "solid-js/web"; | ||
@@ -11,2 +11,8 @@ export const MetaContext = createContext(); | ||
const MetaProvider = props => { | ||
if (!isServer && !sharedConfig.context) { | ||
const ssrTags = document.head.querySelectorAll(`[data-sm]`); // `forEach` on `NodeList` is not supported in Googlebot, so use a workaround | ||
Array.prototype.forEach.call(ssrTags, ssrTag => ssrTag.parentNode.removeChild(ssrTag)); | ||
} | ||
const cascadedTagInstances = new Map(); // TODO: use one element for all tags of the same type, just swap out | ||
@@ -13,0 +19,0 @@ // where the props get applied |
@@ -1,2 +0,2 @@ | ||
import { createContext, createRenderEffect, createUniqueId, onCleanup, useContext } from "solid-js"; | ||
import { createContext, createRenderEffect, createUniqueId, onCleanup, sharedConfig, useContext } from "solid-js"; | ||
import { isServer, spread } from "solid-js/web"; | ||
@@ -7,2 +7,7 @@ export const MetaContext = createContext(); | ||
const MetaProvider = props => { | ||
if (!isServer && !sharedConfig.context) { | ||
const ssrTags = document.head.querySelectorAll(`[data-sm]`); | ||
// `forEach` on `NodeList` is not supported in Googlebot, so use a workaround | ||
Array.prototype.forEach.call(ssrTags, (ssrTag) => ssrTag.parentNode.removeChild(ssrTag)); | ||
} | ||
const cascadedTagInstances = new Map(); | ||
@@ -9,0 +14,0 @@ // TODO: use one element for all tags of the same type, just swap out |
{ | ||
"name": "@solidjs/meta", | ||
"description": "Write meta tags to the document head", | ||
"version": "0.28.1", | ||
"version": "0.28.2", | ||
"author": "Ryan Carniato", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
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
18172
384