react-mobiledoc-hooks
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -181,6 +181,7 @@ 'use strict'; | ||
var items = markers.map(function (item, index) { | ||
var items = markers.map(function (item, key) { | ||
var itemKey = "".concat(nodeKey, "-").concat(key); | ||
return renderMarkersOnElement(React.createElement("li", { | ||
key: index | ||
}, []), item, index); | ||
key: itemKey | ||
}, []), item, itemKey); | ||
}); | ||
@@ -357,6 +358,8 @@ return React.createElement(Tag, { | ||
return mobiledoc.sections.map(function (section, nodeKey) { | ||
return mobiledoc.sections.map(function (section, key) { | ||
var _section = _slicedToArray(section, 1), | ||
type = _section[0]; | ||
var nodeKey = "mobiledoc-".concat(type, "-").concat(key); | ||
switch (type) { | ||
@@ -363,0 +366,0 @@ case MARKUP_SECTION_TYPE: |
{ | ||
"name": "react-mobiledoc-hooks", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Collection of React hooks for Mobiledoc", | ||
"homepage": "https://github.com/hope-media/react-mobiledoc-hooks", | ||
"bugs": "https://github.com/hope-media/react-mobiledoc-hooks/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/hope-media/react-mobiledoc-hooks.git" | ||
}, | ||
"author": "Eduardo Ludi", | ||
@@ -6,0 +12,0 @@ "main": "cjs/index.js", |
@@ -74,5 +74,6 @@ import React from 'react' | ||
function renderListSection([type, Tag, markers], nodeKey) { | ||
const items = markers.map((item, index) => | ||
renderMarkersOnElement(<li key={index}>{[]}</li>, item, index) | ||
) | ||
const items = markers.map((item, key) => { | ||
const itemKey = `${nodeKey}-${key}` | ||
return renderMarkersOnElement(<li key={itemKey}>{[]}</li>, item, itemKey) | ||
}) | ||
@@ -224,5 +225,7 @@ return <Tag key={nodeKey}>{items}</Tag> | ||
return mobiledoc.sections | ||
.map((section, nodeKey) => { | ||
.map((section, key) => { | ||
const [type] = section | ||
const nodeKey = `mobiledoc-${type}-${key}` | ||
switch (type) { | ||
@@ -229,0 +232,0 @@ case MARKUP_SECTION_TYPE: |
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
227746
678
1
2