Skip to content

Commit 8ceebdf

Browse files
committed
Handle when collections aren't objects or object+array
1 parent 01e698a commit 8ceebdf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plot_api/helpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ const collectionsAreEqual = (collection1, collection2) => {
529529
}
530530

531531
return true;
532-
} else {
532+
} else if ([collection1, collection2].every((a) => Lib.isPlainObject(a))) {
533533
if (Object.keys(collection1).length !== Object.keys(collection2).length) return false;
534534

535535
for (const k in collection1) {
@@ -544,5 +544,7 @@ const collectionsAreEqual = (collection1, collection2) => {
544544

545545
return true;
546546
}
547+
548+
return false;
547549
};
548550
exports.collectionsAreEqual = collectionsAreEqual;

0 commit comments

Comments
 (0)