Jelajahi Sumber

fix non-autofixable biome error

Futa Arai 7 bulan lalu
induk
melakukan
620be95118
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  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) {
   // replace node
-  const data = node.data ?? (node.data = {});
+  if (node.data == null) {
+    node.data = {};
+  }
+  const data = node.data;
   data.hName = 'mermaid';
   data.hProperties = {
     value: node.value,