Skip to content

Commit 586132c

Browse files
committed
chore: Fix breaks caused by Array.isArray signature changes
I blame orta... microsoft/TypeScript#41984
1 parent b1636c0 commit 586132c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/converter/converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class Converter extends ChildableComponent<
145145
entryPoints: readonly string[],
146146
programs: ts.Program | readonly ts.Program[]
147147
): ProjectReflection | undefined {
148-
programs = Array.isArray(programs) ? programs : [programs];
148+
programs = programs instanceof Array ? programs : [programs];
149149
this.externalPatternCache = void 0;
150150

151151
const project = new ProjectReflection(this.name);

src/lib/utils/array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export function flatMap<T, U>(
148148

149149
for (const item of arr) {
150150
const newItem = fn(item);
151-
if (Array.isArray(newItem)) {
151+
if (newItem instanceof Array) {
152152
result.push(...newItem);
153153
} else {
154154
result.push(newItem);

0 commit comments

Comments
 (0)