Fix duplicate sx-cssx-live style tags
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 58s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 58s
Cache the style element reference in _cssx-style-el so flush-cssx-to-dom never creates more than one. Previous code called dom-query on every flush, which could miss the element during rapid successive calls, creating duplicates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -460,7 +460,7 @@
|
||||
(sx-process-scripts root)
|
||||
(sx-hydrate root)
|
||||
(sx-hydrate-islands root)
|
||||
(flush-cssx-to-dom)
|
||||
(run-post-render-hooks)
|
||||
(process-elements root)))
|
||||
|
||||
|
||||
@@ -871,7 +871,7 @@
|
||||
(hoist-head-elements-full target)
|
||||
(process-elements target)
|
||||
(sx-hydrate-elements target)
|
||||
(flush-cssx-to-dom)
|
||||
(run-post-render-hooks)
|
||||
(dom-dispatch target "sx:clientRoute"
|
||||
(dict "pathname" pathname))
|
||||
(log-info (str "sx:route client " pathname)))))
|
||||
|
||||
Reference in New Issue
Block a user