react-mobiledoc-hooks
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -253,5 +253,4 @@ 'use strict'; | ||
options: {}, | ||
payload: _objectSpread({}, payload, { | ||
key: nodeKey | ||
}, additionalProps) | ||
payload: _objectSpread({}, payload, additionalProps), | ||
key: nodeKey | ||
}; | ||
@@ -375,3 +374,3 @@ return card.component(props); | ||
} | ||
}); | ||
}).filter(Boolean); // Remove null items from array | ||
} | ||
@@ -378,0 +377,0 @@ |
{ | ||
"name": "react-mobiledoc-hooks", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Collection of React hooks for Mobiledoc", | ||
@@ -5,0 +5,0 @@ "author": "Eduardo Ludi", |
@@ -127,3 +127,4 @@ import React from 'react' | ||
options: {}, | ||
payload: { ...payload, key: nodeKey, ...additionalProps }, | ||
payload: { ...payload, ...additionalProps }, | ||
key: nodeKey, | ||
} | ||
@@ -222,16 +223,18 @@ | ||
// Returns/Renders all sections in mobiledoc | ||
return mobiledoc.sections.map((section, nodeKey) => { | ||
const [type] = section | ||
return mobiledoc.sections | ||
.map((section, nodeKey) => { | ||
const [type] = section | ||
switch (type) { | ||
case MARKUP_SECTION_TYPE: | ||
return renderMarkupSection(section, nodeKey) | ||
case LIST_SECTION_TYPE: | ||
return renderListSection(section, nodeKey) | ||
case CARD_SECTION_TYPE: | ||
return renderCardSection(section, nodeKey) | ||
default: | ||
return null | ||
} | ||
}) | ||
switch (type) { | ||
case MARKUP_SECTION_TYPE: | ||
return renderMarkupSection(section, nodeKey) | ||
case LIST_SECTION_TYPE: | ||
return renderListSection(section, nodeKey) | ||
case CARD_SECTION_TYPE: | ||
return renderCardSection(section, nodeKey) | ||
default: | ||
return null | ||
} | ||
}) | ||
.filter(Boolean) // Remove null items from array | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
227071
674