Fix (not) compilation: use isSxTruthy for NIL-safe negation
NIL is a frozen sentinel object ({_nil:true}) which is truthy in JS.
(not expr) compiled to !expr, so (not nil) returned false instead of
true. Fixed to compile as !isSxTruthy(expr) which correctly handles
NIL. This was preventing client-side routing from activating.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -581,7 +581,7 @@ class JSEmitter:
|
||||
if name == "or":
|
||||
return self._emit_or(expr)
|
||||
if name == "not":
|
||||
return f"!{self.emit(expr[1])}"
|
||||
return f"!isSxTruthy({self.emit(expr[1])})"
|
||||
if name == "do" or name == "begin":
|
||||
return self._emit_do(expr)
|
||||
if name == "list":
|
||||
|
||||
Reference in New Issue
Block a user