passkit-generator
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -46,7 +46,11 @@ "use strict"; | ||
let validItems = []; | ||
for (let i = items.length, field; (field = items[--i]);) { | ||
for (const field of items) { | ||
if (!field) { | ||
console.warn(Messages.format(Messages.FIELDS.INVALID, field)); | ||
continue; | ||
} | ||
try { | ||
Schemas.assertValidity(Schemas.Field, field, Messages.FIELDS.INVALID); | ||
if (instance[sharedKeysPoolSymbol].has(field.key)) { | ||
throw Messages.format(Messages.FIELDS.REPEATED_KEY, field.key); | ||
throw new TypeError(Messages.format(Messages.FIELDS.REPEATED_KEY, field.key)); | ||
} | ||
@@ -57,3 +61,3 @@ instance[sharedKeysPoolSymbol].add(field.key); | ||
catch (err) { | ||
console.warn(err); | ||
console.warn(err.message ? err.message : err); | ||
} | ||
@@ -60,0 +64,0 @@ } |
{ | ||
"name": "passkit-generator", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "The easiest way to generate custom Apple Wallet passes in Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110265
2581