Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid JS when using set! and doseq #466

Closed
martinklepsch opened this issue Feb 14, 2024 · 1 comment
Closed

Invalid JS when using set! and doseq #466

martinklepsch opened this issue Feb 14, 2024 · 1 comment

Comments

@martinklepsch
Copy link
Contributor

martinklepsch commented Feb 14, 2024

version

0.6.90

problem

Invalid JS is generated

repro

;; repro.cljs
(def nodes [])
(doseq [n nodes]
  (set! (.-opacity n) 0))
npx squint-cljs compile repro.cljs
node repro.mjs
return [true, n2.opacity = 0;
                            ^
SyntaxError: Unexpected token ';'

expected behavior

no error :)

Note that this seems to work when adding a nil at the end of the doseq body.

@borkdude
Copy link
Member

good catch, thanks

borkdude added a commit that referenced this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants