mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Moved Bundle.autoFreezable creation in the attempt of creating the bundle after processing promises and leveraging event loop
This commit is contained in:
@@ -86,12 +86,12 @@ export class PKPass extends Bundle {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bundle = Bundle.autoFreezable("application/vnd.apple.pkpasses");
|
|
||||||
|
|
||||||
const buffers = await Promise.all(
|
const buffers = await Promise.all(
|
||||||
passes.map((pass) => pass.getAsBuffer()),
|
passes.map((pass) => pass.getAsBuffer()),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const bundle = Bundle.autoFreezable("application/vnd.apple.pkpasses");
|
||||||
|
|
||||||
for (let i = 0; i < buffers.length; i++) {
|
for (let i = 0; i < buffers.length; i++) {
|
||||||
bundle.addBuffer(`packed-pass-${i + 1}.pkpass`, buffers[i]);
|
bundle.addBuffer(`packed-pass-${i + 1}.pkpass`, buffers[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user