Skip to content

Commit

Permalink
Add support for Refresh Action
Browse files Browse the repository at this point in the history
Closes: #3
  • Loading branch information
tajakobsen committed Aug 12, 2024
1 parent 85db4ee commit 98bf57c
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 actions instanceof Array ? actions.map(serializeOne).join("\n") : serializeOne(actions);
return Array.isArray(actions) ? actions.map(serializeOne).join("\n") : serializeOne(actions);
}

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

0 comments on commit 98bf57c

Please sign in to comment.