From 02d082da9e992364398cf241faa57a9c0fae9f50 Mon Sep 17 00:00:00 2001 From: Balte de Wit Date: Mon, 2 Oct 2023 15:11:19 +0200 Subject: [PATCH] fix: allow lenght of 0 --- src/serializers.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/serializers.ts b/src/serializers.ts index 47ba4f07..7b7bacca 100755 --- a/src/serializers.ts +++ b/src/serializers.ts @@ -39,11 +39,11 @@ const channelOptLayerOptSerializer = ( const clipCommandSerializer = (_command: Commands, { clip, loop, inPoint, seek, length, clearOn404 }: ClipParameters) => (clip ? `"${clip}"` : '') + - (loop ? ' LOOP' : '') + - (inPoint ? ' IN ' + inPoint : '') + - (seek ? ' SEEK ' + seek : '') + - (length ? ' LENGTH ' + length : '') + - (clearOn404 ? ' CLEAR_ON_404' : '') + (loop === true ? ' LOOP' : '') + + (inPoint !== undefined ? ' IN ' + inPoint : '') + + (seek !== undefined ? ' SEEK ' + seek : '') + + (length !== undefined ? ' LENGTH ' + length : '') + + (clearOn404 === true ? ' CLEAR_ON_404' : '') const decklinkCommandSerializer = (_: Commands, { device, format }: DecklinkParameters) => 'DECKLINK ' + device + (format ? ' FORMAT ' + format : '') const htmlCommandSerializerr = (_: Commands, { url }: HtmlParameters) => '[html] ' + url