Skip to content

v5 throws an error when rendering a number #164

Description

@b3nten

This error occurs on the third render. The count reaches 2, then throws:

[Error] TypeError: number is not iterable
update (+esm:7:13600)
Ct (+esm:7:18074)
(anonymous function) (pen.js:10)

import { html, signal, render } from 'https://esm.run/uhtml/auto';

let count = 0

const root = () => html`
  <p>count is ${count}</p>
`

setInterval(() => {
  count++
  render(document.body, root)
}, 1000)

The line where this error occurs is:

const [type, update, prev] = entry;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions