From 6d8f26237aaab9df1fc579edc738bd5eca383b57 Mon Sep 17 00:00:00 2001 From: alexandercerutti Date: Sun, 12 Aug 2018 17:20:42 +0200 Subject: [PATCH] Introduced check for pass.strings buffer length - will be added if greater than 0 --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c0df268..b396c59 100644 --- a/index.js +++ b/index.js @@ -72,8 +72,11 @@ class Pass { return Promise.all([...bundle.map(f => readFile(path.resolve(this.model, f))), _passExtractor()]).then(buffers => { Object.keys(this.l10n).forEach(l => { - buffers.push(this._generateStringFile(l)); - bundle.push(path.join(`${l}.lproj`, `pass.strings`)); + const strings = this._generateStringFile(l); + if (strings.length) { + buffers.push(strings); + bundle.push(path.join(`${l}.lproj`, `pass.strings`)); + } }); return [buffers, bundle];