Skip to content

Commit

Permalink
Set text when add extra
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZillaGold committed Mar 15, 2021
1 parent 745f662 commit 684b52f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
35 changes: 33 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rawjsonbuilder",
"version": "1.1.2",
"version": "1.1.3",
"description": "Minecraft Raw JSON text builder",
"main": "./lib/RawJSONBuilder.js",
"types": "./lib/interfaces.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/RawJSONBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export class RawJSONBuilder {
.map((element) => element.toJSON())
.concat(extra);

if (!Object.keys(this.message).length) {
this.setText("");
}

return this;
}

Expand Down

0 comments on commit 684b52f

Please sign in to comment.