Fix starts-with? crash: guard with string? check on attribute name
orchestration.sx process-elements iterates DOM attributes and calls starts-with? on the name. Some attributes have nil names (e.g. from malformed elements). Added (string? name) guard before starts-with?. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1461,7 +1461,7 @@
|
||||
(let
|
||||
((name (first attr)) (body (nth attr 1)))
|
||||
(when
|
||||
(starts-with? name "sx-on:")
|
||||
(and (string? name) (starts-with? name "sx-on:"))
|
||||
(let
|
||||
((event-name (let ((raw (slice name 6))) (if (or (starts-with? raw "after") (starts-with? raw "before")) (str "sx:" raw) raw))))
|
||||
(when
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1461,7 +1461,7 @@
|
||||
(let
|
||||
((name (first attr)) (body (nth attr 1)))
|
||||
(when
|
||||
(starts-with? name "sx-on:")
|
||||
(and (string? name) (starts-with? name "sx-on:"))
|
||||
(let
|
||||
((event-name (let ((raw (slice name 6))) (if (or (starts-with? raw "after") (starts-with? raw "before")) (str "sx:" raw) raw))))
|
||||
(when
|
||||
|
||||
Reference in New Issue
Block a user