Sfoglia il codice sorgente

fix non-autofixable biome error

Futa Arai 7 mesi fa
parent
commit
620be95118
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      apps/app/src/features/mermaid/services/mermaid.ts

+ 4 - 1
apps/app/src/features/mermaid/services/mermaid.ts

@@ -5,7 +5,10 @@ import { visit } from 'unist-util-visit';
 
 
 function rewriteNode(node: Code) {
 function rewriteNode(node: Code) {
   // replace node
   // replace node
-  const data = node.data ?? (node.data = {});
+  if (node.data == null) {
+    node.data = {};
+  }
+  const data = node.data;
   data.hName = 'mermaid';
   data.hName = 'mermaid';
   data.hProperties = {
   data.hProperties = {
     value: node.value,
     value: node.value,