Skip to content

Commit

Permalink
fix: don't throw err when modify path not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
shaokeyibb committed Sep 3, 2024
1 parent f07d158 commit 2a13646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudflare-workers/src/administration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function renameComments(env: Env, oldPath: string, newPath: string)

export async function modifyComments(env: Env, path: string, diff: ModifiedCommentBody['diff']) {
if (!(await isPathExists(env, path))) {
throw new Error('The path you want to modify does not exist');
return;
}

const offsets: Offset[] = (await getOffsets(env, path)).sort((a, b) => a.start - b.start);
Expand Down

0 comments on commit 2a13646

Please sign in to comment.