Merge branch 'SmaranSingh-master' into develop

This commit is contained in:
AllenFang 2019-04-07 14:32:41 +08:00
commit 8ad0e65679

View File

@ -8,15 +8,18 @@ import { FILTER_TYPE } from '../const';
function optionsEquals(currOpts, prevOpts) {
if (Array.isArray(currOpts)) {
for (let i = 0; i < currOpts.length; i += 1) {
if (
currOpts[i].value !== prevOpts[i].value ||
currOpts[i].label !== prevOpts[i].label
) {
return false;
if (currOpts.length === prevOpts.length) {
for (let i = 0; i < currOpts.length; i += 1) {
if (
currOpts[i].value !== prevOpts[i].value ||
currOpts[i].label !== prevOpts[i].label
) {
return false;
}
}
return true;
}
return currOpts.length === prevOpts.length;
return false;
}
const keys = Object.keys(currOpts);
for (let i = 0; i < keys.length; i += 1) {