mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 22:45:18 +02:00
Add key prop to <br /> elements in html-serializer (#1704)
This commit is contained in:
committed by
Ian Storm Taylor
parent
6678245fba
commit
8689c671f6
@@ -54,7 +54,7 @@ const TEXT_RULE = {
|
||||
serialize(obj, children) {
|
||||
if (obj.object === 'string') {
|
||||
return children.split('\n').reduce((array, text, i) => {
|
||||
if (i != 0) array.push(<br />)
|
||||
if (i != 0) array.push(<br key={i} />)
|
||||
array.push(text)
|
||||
return array
|
||||
}, [])
|
||||
|
Reference in New Issue
Block a user