Commit bb0f803b authored by Kim, Hyeonseo's avatar Kim, Hyeonseo
Browse files

fix: type error due to href becomes optional

parent bf331369
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ export async function getNodeInfo(
        "href" in link &&
        link.href != null
      );
      if (link == null) {
      if (link == null || link.href == null) {
        logger.error(
          "Failed to find a NodeInfo document link from {url}: {resourceDescriptor}",
          { url: wellKnownUrl.href, resourceDescriptor: wellKnownRd },
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ async function lookupObjectInternal(
        l.type !== "application/activity+json" &&
          !l.type?.match(
            /application\/ld\+json;\s*profile="https:\/\/www.w3.org\/ns\/activitystreams"/,
          ) || l.rel !== "self"
          ) || l.rel !== "self" || l.href == null
      ) continue;
      try {
        const remoteDoc = await documentLoader(l.href, {