Closes #538
Seems simple and obvious because it is, we should check that startBlock exists before using it
This commit is contained in:
@@ -138,7 +138,8 @@ class LinkToolbar extends Component {
|
||||
if (href) {
|
||||
change.setInline({ type: 'link', data: { href } });
|
||||
} else if (link) {
|
||||
const selContainsLink = !!change.value.startBlock.getChild(link.key);
|
||||
const startBlock = change.value.startBlock;
|
||||
const selContainsLink = !!(startBlock && startBlock.getChild(link.key));
|
||||
if (selContainsLink) change.unwrapInlineByKey(link.key);
|
||||
}
|
||||
change.deselect();
|
||||
|
||||
Reference in New Issue
Block a user