Skip to content

Commit 6530602

Browse files
authored
Simplify result handling in README example
1 parent 5e32629 commit 6530602

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ const handle = spawn(() => {
5252
});
5353

5454
// Wait for the result
55-
const result = await handle.join();
56-
57-
if (result.ok) {
58-
console.log("Result:", result.value); // 0.6378467071314606
59-
} else {
60-
console.error("Worker error:", result.error);
61-
}
55+
const result = await handle.join(); // { ok: true, value: 0.6378467071314606 }
6256
```
6357

6458
-----

0 commit comments

Comments
 (0)