Skip to content

Commit

Permalink
Merge pull request #111 from dependentmadani/migrate-typescript
Browse files Browse the repository at this point in the history
Fix issue of undefined
  • Loading branch information
neSpecc authored Jul 3, 2024
2 parents d7e0306 + 5b97965 commit dbaf97d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/header",
"version": "2.8.3",
"version": "2.8.4",
"keywords": [
"codex editor",
"header",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '';
Expand Down

0 comments on commit dbaf97d

Please sign in to comment.