fix: failed to parse status card from html

This commit is contained in:
yanmao 2021-12-27 22:12:04 +08:00
parent 96e80b254f
commit 1862e453fa
1 changed files with 1 additions and 2 deletions

View File

@ -69,8 +69,7 @@ export default class<T extends StatusOptions> extends Plugin<T> {
const type = attributes['data-type'];
if (type === StatusComponent.cardName) {
const value = attributes['data-value'];
const cardValue = decodeCardValue(value);
if (!cardValue.name) return;
const cardValue = decodeCardValue<StatusValue>(value);
this.editor.card.replaceNode(
node,
StatusComponent.cardName,