Skip to content

Commit

Permalink
Roll back to Array-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
tajakobsen committed Aug 12, 2024
1 parent 98bf57c commit c25b892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/lib/turbo-streams/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function serialize(action: TurboStreamAction): string;
export function serialize(actions: ReadonlyArray<TurboStreamAction>): string;
export function serialize(actions: TurboStreamAction | ReadonlyArray<TurboStreamAction>): string;
export function serialize(actions: TurboStreamAction | ReadonlyArray<TurboStreamAction>): string {
return Array.isArray(actions) ? actions.map(serializeOne).join("\n") : serializeOne(actions);
return actions instanceof Array ? actions.map(serializeOne).join("\n") : serializeOne(actions);
}

function serializeOne(action: TurboStreamAction): string {
Expand Down

0 comments on commit c25b892

Please sign in to comment.