mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 06:31:28 +02:00
fix renderPortal
deprecation
This commit is contained in:
@@ -130,10 +130,12 @@ class Stack extends Record(DEFAULTS) {
|
|||||||
return plugins.reduceRight((children, plugin) => {
|
return plugins.reduceRight((children, plugin) => {
|
||||||
if (!plugin[property]) return children
|
if (!plugin[property]) return children
|
||||||
|
|
||||||
|
if (property === 'renderPortal') {
|
||||||
logger.deprecate(
|
logger.deprecate(
|
||||||
'0.39.0',
|
'0.39.0',
|
||||||
'The `renderPortal` property of plugins is deprecated, please use `renderEditor` with a `<React.Fragment>` in React 16 instead.'
|
'The `renderPortal` property of plugins is deprecated, please use `renderEditor` with a `<React.Fragment>` in React 16 instead.'
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const ret = plugin[property](props, ...args)
|
const ret = plugin[property](props, ...args)
|
||||||
if (ret == null) return children
|
if (ret == null) return children
|
||||||
|
Reference in New Issue
Block a user