code review: one getter per instance is wasteful

This commit is contained in:
gorhill 2017-01-07 17:18:22 -05:00
parent 2691ac95b4
commit a927725bd9

View file

@ -1066,14 +1066,14 @@ var FilterBucket = function(a, b) {
this.filters[1] = b;
}
}
Object.defineProperty(this, 'rtfid', {
get: function() {
return this.f.rtfid;
}
});
};
Object.defineProperty(FilterBucket.prototype, 'rtfid', {
get: function() {
return this.f.rtfid;
}
});
FilterBucket.prototype.add = function(a) {
this.filters.push(a);
};