Skip to content

Commit 713725a

Browse files
committed
Fix type error
1 parent fa6bdb6 commit 713725a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

denops/ddc/app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ export const main: Entrypoint = (denops: Denops) => {
244244
// Convert to UserSource
245245
const userSource =
246246
options.sources.find((source) =>
247-
(is.Record(source) ? source.name : source) === sourceName
247+
(typeof source === "object" && "name" in source
248+
? source.name
249+
: source) === sourceName
248250
) ?? sourceName;
249251

250252
cbContext.revoke();

0 commit comments

Comments
 (0)