From c0507915d4f7326009265c33f069c67866d8e2dd Mon Sep 17 00:00:00 2001 From: Alexander Schuch Date: Sun, 14 Oct 2012 21:42:24 +0200 Subject: [PATCH] Fixed validation error when creating a pass of type boardingPass --- lib/passbook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/passbook.js b/lib/passbook.js index 9eb0012..7b4bb5d 100644 --- a/lib/passbook.js +++ b/lib/passbook.js @@ -44,7 +44,7 @@ function createTemplate(style, fields) { // style - Passbook style (coupon, eventTicket, etc) // fields - Passbook fields (passTypeIdentifier, teamIdentifier, etc) function Template(style, fields) { - if (!STYLES.indexOf(style)) + if (STYLES.indexOf(style) < 0) throw new Error("Unsupported passbook style " + style); this.style = style; this.fields = cloneObject(fields);