Added Bundle.prototype.isFrozen getter and used it to close pass if it is not yet frozen

This commit is contained in:
Alexander Cerutti
2021-09-26 18:17:24 +02:00
parent d41a592a69
commit 1b3647da8f
2 changed files with 17 additions and 4 deletions

View File

@@ -465,7 +465,9 @@ export default class PKPass extends Bundle {
* @TODO warning if no icon files
*/
this[closePassSymbol]();
if (!this.isFrozen) {
this[closePassSymbol]();
}
return super.getAsBuffer();
}
@@ -486,7 +488,9 @@ export default class PKPass extends Bundle {
* @TODO warning if no icon files
*/
this[closePassSymbol]();
if (!this.isFrozen) {
this[closePassSymbol]();
}
return super.getAsStream();
}