diff --git a/index.js b/index.js index 3f9c74b..dd183e5 100644 --- a/index.js +++ b/index.js @@ -341,6 +341,7 @@ class Pass { return Promise.resolve(passBuffer); } + const rgbValues = ["backgroundColor", "foregroundColor", "labelColor"]; let passFile = JSON.parse(passBuffer.toString("utf8")); // "barcodes" support got introduced in iOS 9 as array of barcode. @@ -383,6 +384,8 @@ class Pass { delete this.props["barcode"]; + rgbValues.filter(v => this.props[v] && !isValidRGB(this.props[v])).forEach(v => delete this.props[v]); + if (this.shouldOverwrite) { Object.assign(passFile, this.props); } else {