Socket
Socket
Sign inDemoInstall

react-mobiledoc-hooks

Package Overview
Dependencies
8
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

7

cjs/useMobiledoc.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc