message: fix(theme): fix excerpt generating under edge case
diff: @@ -20,8 +20,9 @@ import type {
  ThemeNormalPageFrontmatter,
  } from "../../shared/index.js";
  -const renderNodes = (app: App, nodes: AnyNode[]): AnyNode[] =>
  - nodes
  +const renderNodes = (app: App, nodes: AnyNode[]): AnyNode[] | [] =>
  + Array.isArray(nodes)
  + ? nodes
  .map((node) => {
  if (node.type === "tag") {
  // image using relative urls shall be dropped
  @@ -65,7 +66,8 @@ const renderNodes = (app: App, nodes: AnyNode[]): AnyNode[] =>
  return node;
  })
  - .filter((node): node is AnyNode => node !== null);
  + .filter((node): node is AnyNode => node !== null)
  + : nodes;
  const $ = load("");
  @@ -97,7 +99,7 @@ export const getPageExcerpt = (
  }
  );
  - return $.html(renderNodes(app, $.parseHTML(renderedContent)));
  + return $.html(renderNodes(app, $.parseHTML(renderedContent)) || []);
  };
  export const injectBlogInfo = (
  