Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit de78fcd

Browse files
authored
Fix resolution comparsion when width or height is 0 (#1067)
1 parent e4cf5f4 commit de78fcd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/common/mediaUtil.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ const resolution2String = (r) => {
7272
};
7373

7474
const isResolutionEqual = (r1, r2) => {
75-
return r1.width && r1.height && r2.width && r2.height
75+
return (typeof r1.width === 'number')
76+
&& (typeof r1.height === 'number')
7677
&& (r1.width === r2.width)
7778
&& (r1.height === r2.height);
7879
};

0 commit comments

Comments
 (0)