1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00

fix renderPortal deprecation

This commit is contained in:
Ian Storm Taylor 2018-08-22 14:13:16 -07:00
parent b8ed582ba4
commit f2adf13850

View File

@ -130,10 +130,12 @@ class Stack extends Record(DEFAULTS) {
return plugins.reduceRight((children, plugin) => {
if (!plugin[property]) return children
logger.deprecate(
'0.39.0',
'The `renderPortal` property of plugins is deprecated, please use `renderEditor` with a `<React.Fragment>` in React 16 instead.'
)
if (property === 'renderPortal') {
logger.deprecate(
'0.39.0',
'The `renderPortal` property of plugins is deprecated, please use `renderEditor` with a `<React.Fragment>` in React 16 instead.'
)
}
const ret = plugin[property](props, ...args)
if (ret == null) return children