reachat 2.1.0-alpha.15 → 2.1.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1580,17 +1580,15 @@
1580
1580
  function remarkCve() {
1581
1581
  return (tree) => {
1582
1582
  mdastUtilFindAndReplace.findAndReplace(tree, [[CVE_REGEX, replaceCve]], {
1583
- ignore: ["link"]
1583
+ ignore: ["link", "linkReference"]
1584
1584
  });
1585
1585
  };
1586
- function replaceCve(value, id) {
1587
- return [
1588
- {
1589
- type: "link",
1590
- url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${id}`,
1591
- children: [{ children: [{ type: "text", value: value.trim() }] }]
1592
- }
1593
- ];
1586
+ function replaceCve(value) {
1587
+ return {
1588
+ type: "link",
1589
+ url: `https://cve.mitre.org/cgi-bin/cvename.cgi?name=${value}`,
1590
+ children: [{ type: "text", value: value.trim() }]
1591
+ };
1594
1592
  }
1595
1593
  }
1596
1594
  const SessionEmpty = ({ children }) => {
@@ -1876,7 +1874,7 @@ ${response}`),
1876
1874
  }
1877
1875
  const { imageFiles, otherFiles } = files.reduce(
1878
1876
  (acc, file) => {
1879
- if (file.type.startsWith("image/")) {
1877
+ if (file.type?.startsWith("image/")) {
1880
1878
  acc.imageFiles.push(file);
1881
1879
  } else {
1882
1880
  acc.otherFiles.push(file);