observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Uncaught errors in Observable's cell update handling #465

Closed mootari closed 1 year ago

mootari commented 2 years ago

Describe the bug

Given three cells:

viewof a = html`<input type=range>`
viewof b = html`<input type=range>`
{
  for await(const v of Generators.input(viewof b)) yield [a, v];
}

performing the following steps:

  1. move slider a one or more times
  2. move slider b once

will trigger the console error:

Uncaught (in promise) ƒ sn(){throw sn}

The number of errors depends on the number of times a did update before updating b.

The error gets thrown here: image

mootari commented 2 years ago

Demo: https://observablehq.com/d/06d276b6c217a129

mbostock commented 2 years ago

Thanks for the report. A fix is up at https://github.com/observablehq/runtime/pull/337.