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

Syntax error #248

Closed
caesar1shi opened this issue Mar 31, 2024 · 1 comment · Fixed by #274
Closed

Syntax error #248

caesar1shi opened this issue Mar 31, 2024 · 1 comment · Fixed by #274
Labels

Comments

@caesar1shi
Copy link
Contributor

in render.js

function setAttribute(key, attribs, data) {
  let val = attribs[key]
  if (!val) return

  // TODO: check all non-strings here
  if (val.constructor === Object) return

  // attributes must be strings
  if (val === 0 || 1 * val) val = attribs[key] = '' + val

Condition 'val === 0' is always false at this point because the false branch of the condition '!val' at line 59 has been taken

@nobkd
Copy link
Collaborator

nobkd commented Mar 31, 2024

Probably explains this: #227 (comment)

Probably related: #193

Edit: Those are mostly unrelated. Those from my examples never reach setAttribute. Also, I think they have been fixed with a3b29f5 with processFor (Release happened sometime later, but I probably didn't check again.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants