Only write flags when they evaluate to true.

This commit is contained in:
Ruben Vermeersch
2015-07-17 10:35:25 +02:00
parent db5e540824
commit 104d114d5d
4 changed files with 32 additions and 3 deletions

View File

@@ -289,7 +289,9 @@ PO.Item.prototype.toString = function () {
lines.push('#: ' + ref);
});
var flags = Object.keys(this.flags);
var flags = Object.keys(this.flags).filter(function (flag) {
return !!this.flags[flag];
}, this);
if (flags.length > 0) {
lines.push('#, ' + flags.join(','));
}