Remove unneeded if-clauses.
This commit is contained in:
24
lib/po.js
24
lib/po.js
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user