Skip to content

Commit 2e2fc8d

Browse files
authored
fix(fs): use correct arg name for unwatch (#857)
* fix(fs): use correct arg name for unwatch * fmt
1 parent 85f8419 commit 2e2fc8d

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changes/fs-unwtach-rid.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fs-js": "patch"
3+
---
4+
5+
Fix `invalid args id for command unwatch` error when trying to unwatch a previously watched file or directory.

plugins/fs/guest-js/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,8 +1135,8 @@ type DebouncedEvent =
11351135
*/
11361136
type UnwatchFn = () => void;
11371137

1138-
async function unwatch(id: number): Promise<void> {
1139-
await invoke("plugin:fs|unwatch", { id });
1138+
async function unwatch(rid: number): Promise<void> {
1139+
await invoke("plugin:fs|unwatch", { rid });
11401140
}
11411141

11421142
/**

plugins/fs/src/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)