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

Commit

Permalink
Fix resolution comparsion when width or height is 0 (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
starwarfan authored Sep 1, 2021
1 parent e4cf5f4 commit de78fcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/common/mediaUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const resolution2String = (r) => {
};

const isResolutionEqual = (r1, r2) => {
return r1.width && r1.height && r2.width && r2.height
return (typeof r1.width === 'number')
&& (typeof r1.height === 'number')
&& (r1.width === r2.width)
&& (r1.height === r2.height);
};
Expand Down

0 comments on commit de78fcd

Please sign in to comment.