Skip to content

Commit 2b811cd

Browse files
committed
fix file no longer exists on rename
1 parent 2078c98 commit 2b811cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ function handleWatch(socket: WebSocket, options: {root: string; resolver: CellRe
234234
case "rename": {
235235
markdownWatcher?.close();
236236
try {
237-
markdownWatcher = watch(path, watcher);
237+
markdownWatcher = watch(join(root, path), watcher);
238238
} catch (error) {
239239
if (isNodeError(error) && error.code === "ENOENT") {
240240
console.error(`file no longer exists: ${path}`);

0 commit comments

Comments
 (0)