diff --git a/package.json b/package.json index 00c06a1..28a4480 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/header", - "version": "2.8.3", + "version": "2.8.4", "keywords": [ "codex editor", "header", diff --git a/src/index.ts b/src/index.ts index 433e263..07be85f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -148,7 +148,7 @@ export default class Header { const newData: HeaderData = {text: '', level: this.defaultLevel.number }; if (typeof data !== 'object') { - data = {} as HeaderData; + data = {text: '', level: this.defaultLevel.number}; } newData.text = data.text || '';