[jsinterp] Fix div bug breaking player 8c7583ff

Thx bashonly: https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1585639223
Fixes #32292
This commit is contained in:
dirkf 2023-06-11 13:33:50 +01:00
commit a2534f7b88
3 changed files with 54 additions and 1 deletions

View file

@ -82,7 +82,7 @@ def _js_arith_op(op):
def _js_div(a, b):
if JS_Undefined in (a, b) or not (a and b):
if JS_Undefined in (a, b) or not (a or b):
return _NaN
return operator.truediv(a or 0, b) if b else float('inf')