Remove unneeded if-clauses.

This commit is contained in:
Ruben Vermeersch
2014-03-07 10:17:52 +01:00
parent d426c114c7
commit dba7465ba7
3 changed files with 19 additions and 31 deletions

View File

@@ -218,23 +218,17 @@ PO.Item.prototype.toString = function () {
// https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
// says order is translator-comments, extracted-comments, references, flags
if (this.comments.length > 0) {
this.comments.forEach(function (c) {
lines.push('# ' + c);
});
}
this.comments.forEach(function (c) {
lines.push('# ' + c);
});
if (this.extractedComments.length > 0) {
this.extractedComments.forEach(function (c) {
lines.push('#. ' + c);
});
}
this.extractedComments.forEach(function (c) {
lines.push('#. ' + c);
});
if (this.references.length > 0) {
this.references.forEach(function (ref) {
lines.push('#: ' + ref);
});
}
this.references.forEach(function (ref) {
lines.push('#: ' + ref);
});
var flags = Object.keys(this.flags);
if (flags.length > 0) {