diff options
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/40_signals.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/js/40_signals.js b/runtime/js/40_signals.js index dfc604759..bf6be1263 100644 --- a/runtime/js/40_signals.js +++ b/runtime/js/40_signals.js @@ -236,7 +236,15 @@ f, g, ) { - return this.#pollingPromise.then(() => {}).then(f, g); + return this.#pollingPromise.then((done) => { + if (done) { + // If pollingPromise returns true, then + // this signal stream is finished and the promise API + // should never be resolved. + return new Promise(() => {}); + } + return; + }).then(f, g); } async next() { |