Skip to content

Commit 3b07c00

Browse files
authored
Use old school ES5 just in case
1 parent 77c543d commit 3b07c00

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/document.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,13 +2595,13 @@ Document.prototype.depopulate = function(path) {
25952595
if (typeof path === 'string') {
25962596
path = path.split(' ');
25972597
}
2598-
for (const p of path) {
2599-
var populatedIds = this.populated(p);
2598+
for (var i = 0; i < path.length; i++) {
2599+
var populatedIds = this.populated(path[i]);
26002600
if (!populatedIds) {
26012601
continue;
26022602
}
2603-
delete this.$__.populated[p];
2604-
this.$set(p, populatedIds);
2603+
delete this.$__.populated[path[i]];
2604+
this.$set(path[i], populatedIds);
26052605
}
26062606
return this;
26072607
};

0 commit comments

Comments
 (0)