diff --git a/js/ui/components/EventDetailsModal.js b/js/ui/components/EventDetailsModal.js index 0515ebe4..614898eb 100644 --- a/js/ui/components/EventDetailsModal.js +++ b/js/ui/components/EventDetailsModal.js @@ -198,9 +198,13 @@ export class EventDetailsModal { break; } case "open-channel": { - if (this.currentVideo.pubkey) { + const pubkey = + this.currentVideo && typeof this.currentVideo.pubkey === "string" + ? this.currentVideo.pubkey + : ""; + if (pubkey) { this.close(); - this.callbacks.openCreatorChannel(this.currentVideo.pubkey); + this.callbacks.openCreatorChannel(pubkey); } break; }