File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @solidjs/meta" ,
33 "description" : " Write meta tags to the document head" ,
4- "version" : " 0.28.1 " ,
4+ "version" : " 0.28.2 " ,
55 "author" : " Ryan Carniato" ,
66 "license" : " MIT" ,
77 "repository" : {
Original file line number Diff line number Diff line change 55 createUniqueId ,
66 JSX ,
77 onCleanup ,
8- ParentComponent ,
9- useContext
8+ ParentComponent , sharedConfig , useContext
109} from "solid-js" ;
1110import { isServer , spread } from "solid-js/web" ;
1211
@@ -33,6 +32,11 @@ const cascadingTags = ["title", "meta"];
3332const getTagType = ( tag : TagDescription ) => tag . tag + ( tag . name ? `.${ tag . name } "` : "" ) ;
3433
3534const MetaProvider : ParentComponent < { tags ?: Array < TagDescription > } > = props => {
35+ if ( ! isServer && ! sharedConfig . context ) {
36+ const ssrTags = document . head . querySelectorAll ( `[data-sm]` ) ;
37+ // `forEach` on `NodeList` is not supported in Googlebot, so use a workaround
38+ Array . prototype . forEach . call ( ssrTags , ( ssrTag : Node ) => ssrTag . parentNode ! . removeChild ( ssrTag ) ) ;
39+ }
3640 const cascadedTagInstances = new Map ( ) ;
3741
3842 // TODO: use one element for all tags of the same type, just swap out
You can’t perform that action at this time.
0 commit comments