render-dom-lake: mark reused lakes to prevent SPA nav conflicts
After reusing an SSR lake element, set data-sx-lake-claimed attribute. Subsequent dom-query uses :not([data-sx-lake-claimed]) to skip already- reused elements, preventing SPA navigation from picking up stale lakes from previous pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -920,7 +920,7 @@
|
||||
(dict "i" 0 "skip" false)
|
||||
args)
|
||||
(let
|
||||
((existing (when (and (client?) lake-id) (dom-query (str "[data-sx-lake=\"" lake-id "\"]")))))
|
||||
((existing (when (and (client?) lake-id) (let ((el (dom-query (str "[data-sx-lake=\"" lake-id "\"]:not([data-sx-lake-claimed])")))) (when el (dom-set-attr el "data-sx-lake-claimed" "1")) el))))
|
||||
(if
|
||||
existing
|
||||
existing
|
||||
|
||||
Reference in New Issue
Block a user