Commit 9090fd5
authored
fix: allow 0 as a valid time value for poster thumbnails (#432)
Previously, passing `time = 0` (intending to fetch the first frame of the video)
was ignored because the code used a truthy check (`if (time)`). Since `0` is falsy
in JavaScript, the `time` param was not included in the request, causing Mux to
fall back to its default thumbnail time.
This commit updates the condition to check explicitly for `undefined` instead of
falsiness. As a result, `0` is now correctly passed through as a valid value,
while `undefined` continues to omit the `time` parameter.
Signed-off-by: Stefan Göllner <[email protected]>1 parent 5d03267 commit 9090fd5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments