1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-02 20:37:08 +01:00

[fix] Private fields: resolve off-by-one error [2].

This commit is contained in:
hacksalot
2018-01-31 15:22:15 -05:00
parent c6adab7f9e
commit fde2146a0b
2 changed files with 23 additions and 2 deletions

View File

@ -79,7 +79,7 @@ Definition of the AbstractResume class.
ignoreList = [];
privateList = [];
includePrivates = (opts != null ? opts["private"] : void 0) == null ? true : opts != null ? opts["private"] : void 0;
scrubbed = traverse(rep).map(function(x) {
scrubbed = traverse(rep).map(function() {
if (!this.isLeaf) {
if (this.node.ignore === true || this.node.ignore === 'true') {
ignoreList.push(this.node);
@ -89,6 +89,11 @@ Definition of the AbstractResume class.
this["delete"]();
}
}
if (_.isArray(this.node)) {
this.after(function() {
this.update(_.compact(this.node));
});
}
});
return {
scrubbed: scrubbed,