mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 14:25:17 +00:00
Added template validation
This commit is contained in:
@@ -79,11 +79,7 @@ export default class PKPass extends Bundle {
|
|||||||
JSON.stringify(source[propsSymbol]),
|
JSON.stringify(source[propsSymbol]),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (!source.model || typeof source.model !== "string") {
|
Schemas.assertValidity(Schemas.Template, source);
|
||||||
throw new TypeError(
|
|
||||||
"Cannot create PKPass from source: unknown model but expected a string.",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
buffers = await getModelFolderContents(source.model);
|
buffers = await getModelFolderContents(source.model);
|
||||||
certificates = source.certificates;
|
certificates = source.certificates;
|
||||||
|
|||||||
Reference in New Issue
Block a user