summaryrefslogtreecommitdiff
path: root/runtime/js/40_fs_events.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-05 18:40:24 +0200
committerGitHub <noreply@github.com>2021-04-05 18:40:24 +0200
commit2aed322dd507a8568b6ee6f4897e9a8e3220f763 (patch)
treee9a45c0b7688a9881ea9ce132b92554ef2955ad6 /runtime/js/40_fs_events.js
parent284e6c303956e8ca20af63b4ecc045438a260fe6 (diff)
refactor: convert ops to use serde_v8 (#10009)
This commit rewrites most of the ops to use "serde_v8" instead of "json" serialization.
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 };