mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Removed useless try-catch
This commit is contained in:
4
index.js
4
index.js
@@ -430,7 +430,6 @@ class Pass {
|
||||
_validateType(passBuffer) {
|
||||
let passTypes = ["boardingPass", "eventTicket", "coupon", "generic", "storeCard"];
|
||||
|
||||
try {
|
||||
let passFile = JSON.parse(passBuffer.toString("utf8"));
|
||||
let index = passTypes.findIndex(passType => passFile.hasOwnProperty(passType));
|
||||
|
||||
@@ -442,9 +441,6 @@ class Pass {
|
||||
|
||||
this.type = type;
|
||||
return schema.isValid(passFile[type], "passDict");
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user