Skip to content

Commit

Permalink
🐛 Fix formatting destorying NBT numbers
Browse files Browse the repository at this point in the history
Fix #369. [skip ci]
  • Loading branch information
SPGoding committed Mar 22, 2020
1 parent ed697c0 commit 9d590b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/types/Line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ export function saturatedLineToLine(line: SaturatedLine) {
}

export function lineToLintedString(line: Line, lint: LintConfig) {
return line.args.map(v => toFormattedString(v, lint)).join(' ')
return line.args.map(v => toFormattedString(v.data, lint)).join(' ')
}
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function toFormattedString(value: any, lint: LintConfig): string {
if (value && value[ToFormattedString]) {
return value[ToFormattedString](lint)
} else {
return `${value}`
return value.toString()
}
}

Expand Down

0 comments on commit 9d590b1

Please sign in to comment.