bug: validation failure

This commit is contained in:
Kieran 2023-04-17 11:56:44 +01:00
parent d1efce3bea
commit eed1d43327
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -74,10 +74,10 @@ export class EventBuilder {
}
#validate() {
if (!this.#kind) {
if (this.#kind === undefined) {
throw new Error("Kind must be set");
}
if (!this.#pubkey) {
if (this.#pubkey === undefined) {
throw new Error("Pubkey must be set");
}
}