Skip to content

Commit 3a7f3bd

Browse files
committed
🐛 Fix type error on err.message
1 parent 7ac698e commit 3a7f3bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

denops/@denops-private/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class Plugin {
275275
try {
276276
return await this.#denops.dispatcher[fn](...args);
277277
} catch (err) {
278-
const errMsg = err.message ?? err;
278+
const errMsg = err instanceof Error ? err.message : String(err);
279279
throw new Error(
280280
`Failed to call '${fn}' API in '${this.name}': ${errMsg}`,
281281
);

0 commit comments

Comments
 (0)