Introduced check for pass.strings buffer length - will be added if greater than 0

This commit is contained in:
alexandercerutti
2018-08-12 17:20:42 +02:00
parent 31bb8ac3a0
commit 6d8f26237a

View File

@@ -72,8 +72,11 @@ class Pass {
return Promise.all([...bundle.map(f => readFile(path.resolve(this.model, f))), _passExtractor()]).then(buffers => { return Promise.all([...bundle.map(f => readFile(path.resolve(this.model, f))), _passExtractor()]).then(buffers => {
Object.keys(this.l10n).forEach(l => { Object.keys(this.l10n).forEach(l => {
buffers.push(this._generateStringFile(l)); const strings = this._generateStringFile(l);
if (strings.length) {
buffers.push(strings);
bundle.push(path.join(`${l}.lproj`, `pass.strings`)); bundle.push(path.join(`${l}.lproj`, `pass.strings`));
}
}); });
return [buffers, bundle]; return [buffers, bundle];