Skip to content
Merged
Prev Previous commit
Next Next commit
Handle when collections aren't objects or object+array
  • Loading branch information
camdecoster committed Oct 15, 2025
commit 8ceebdf0600a8678e1cec06eb0bec5107dd43a20
4 changes: 3 additions & 1 deletion src/plot_api/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ const collectionsAreEqual = (collection1, collection2) => {
}

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

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

return true;
}

return false;
};
exports.collectionsAreEqual = collectionsAreEqual;