mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-20 05:14:02 -07:00
[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:
parent
b8a86dcf1a
commit
a2534f7b88
3 changed files with 54 additions and 1 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue