Skip to content

Commit

Permalink
null check for link source
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Nov 30, 2023
1 parent 6c07f38 commit ffe75f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bit-systems/link-hover-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ async function handleLinkClick(world: HubsWorld, button: EntityID) {
const menu = findAncestorWithComponent(world, LinkHoverMenu, button)!;
const linkEid = LinkHoverMenu.targetObjectRef[menu];
const src = APP.getString(Link.url[linkEid])!;
if (!src) return;
const url = new URL(src);
const linkType = Link.type[linkEid];
switch (linkType) {
Expand Down

0 comments on commit ffe75f9

Please sign in to comment.