From de78fcd89347f71cb11988f49fca4b87a1f7562d Mon Sep 17 00:00:00 2001 From: ChenLi Date: Wed, 1 Sep 2021 16:11:36 +0800 Subject: [PATCH] Fix resolution comparsion when width or height is 0 (#1067) --- source/common/mediaUtil.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/common/mediaUtil.js b/source/common/mediaUtil.js index 09224b0a6..32eddc2f9 100644 --- a/source/common/mediaUtil.js +++ b/source/common/mediaUtil.js @@ -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); };