summaryrefslogtreecommitdiff
path: root/runtime/js/40_fs_events.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_fs_events.js')
-rw-r--r--runtime/js/40_fs_events.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/js/40_fs_events.js b/runtime/js/40_fs_events.js
index c48d410f1..06ad3a29c 100644
--- a/runtime/js/40_fs_events.js
+++ b/runtime/js/40_fs_events.js
@@ -19,9 +19,10 @@
async next() {
try {
- return await core.jsonOpAsync("op_fs_events_poll", {
- rid: this.rid,
- });
+ const value = await core.jsonOpAsync("op_fs_events_poll", this.rid);
+ return value
+ ? { value, done: false }
+ : { value: undefined, done: true };
} catch (error) {
if (error instanceof errors.BadResource) {
return { value: undefined, done: true };