ソースを参照

props flood fixes

Ivan Asmer 4 年 前
コミット
c205fdf458
1 ファイル変更1 行追加1 行削除
  1. 1 1
      index.mjs

+ 1 - 1
index.mjs

@@ -671,7 +671,7 @@ function toReact(ast, React, mapMDToComponents=defaultMapMDToComponents){
     const _ = React.createElement.bind(React)
     const childToReact = child => typeof child === 'string' ?  child  : 
                                                                toReact(child, React, mapMDToComponents)
-    const props = {key: Math.random()
+    const props = {key: Math.random(),
                                children: ast.children.map(childToReact)}
     if (typeof RenderComponent !== 'string' && RenderComponent !== React.Fragment)
         Object.assign(props,{node: ast,