Open nova706 opened 10 years ago
Line 141 of persistence.sync will not do anything because the original arrays are not altered by the concat method.
existingItems.concat(groupOfExistingItems);
should be:
existingItems = existingItems.concat(groupOfExistingItems);
From MDN: "concat does not alter this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same elements combined from the original arrays." https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat
+1
Line 141 of persistence.sync will not do anything because the original arrays are not altered by the concat method.
should be:
From MDN: "concat does not alter this or any of the arrays provided as arguments but instead returns a shallow copy that contains copies of the same elements combined from the original arrays." https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat