Safe array cast
Transpiling (array)($expr)
by Array.from(expr)
is not safe if expr is null
or undefined
.
Use the ||
binary operator as a safe fallback
Transpiling (array)($expr)
by Array.from(expr)
is not safe if expr is null
or undefined
.
Use the ||
binary operator as a safe fallback