Added NFC_INVALID message

This commit is contained in:
Alexander Cerutti
2019-06-30 02:10:12 +02:00
parent 1226bb21c7
commit 35789a3d34
2 changed files with 4 additions and 3 deletions

View File

@@ -442,8 +442,8 @@ export class Pass implements PassIndexSignature {
return this;
}
if (!(typeof data === "object" && !Array.isArray(data) && schema.isValid(data, "nfcDict"))) {
genericDebug("Invalid NFC data provided");
if (!(data && typeof data === "object" && !Array.isArray(data) && schema.isValid(data, "nfcDict"))) {
genericDebug(formatMessage("NFC_INVALID"));
return this;
}