From 58bb4bdd9ae7dae2b099627276d0ac52c1c0410c Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sun, 26 Sep 2021 16:07:04 +0200 Subject: [PATCH] Made string file to be added only if stringsFile has a length --- src/PKPass.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PKPass.ts b/src/PKPass.ts index 60d2450..a27827c 100644 --- a/src/PKPass.ts +++ b/src/PKPass.ts @@ -396,10 +396,11 @@ export default class PKPass extends Bundle { ) { const [lang, translations] = entry; - super.addBuffer( - `${lang}.lproj/pass.strings`, - createStringFile(translations), - ); + const stringsFile = createStringFile(translations); + + if (stringsFile.length) { + super.addBuffer(`${lang}.lproj/pass.strings`, stringsFile); + } } /**