Skip to content

Commit

Permalink
Use old school ES5 just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreisnz committed Nov 7, 2017
1 parent 77c543d commit 3b07c00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -2595,13 +2595,13 @@ Document.prototype.depopulate = function(path) {
if (typeof path === 'string') {
path = path.split(' ');
}
for (const p of path) {
var populatedIds = this.populated(p);
for (var i = 0; i < path.length; i++) {
var populatedIds = this.populated(path[i]);
if (!populatedIds) {
continue;
}
delete this.$__.populated[p];
this.$set(p, populatedIds);
delete this.$__.populated[path[i]];
this.$set(path[i], populatedIds);
}
return this;
};
Expand Down

0 comments on commit 3b07c00

Please sign in to comment.