diff --git a/src/main/resources/lib/turbo-streams/actions.ts b/src/main/resources/lib/turbo-streams/actions.ts index 6975ffb..fb65a0c 100644 --- a/src/main/resources/lib/turbo-streams/actions.ts +++ b/src/main/resources/lib/turbo-streams/actions.ts @@ -77,7 +77,7 @@ export function serialize(action: TurboStreamAction): string; export function serialize(actions: ReadonlyArray): string; export function serialize(actions: TurboStreamAction | ReadonlyArray): string; export function serialize(actions: TurboStreamAction | ReadonlyArray): 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 {