mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-30 17:49:34 +00:00
Fix adding braces to nbt fileds constantly
This commit is contained in:
4
model.js
4
model.js
@@ -318,10 +318,10 @@ function updateField(el) {
|
||||
}
|
||||
} else if (type === 'nbt') {
|
||||
|
||||
if (!value.startsWith('{')) {
|
||||
if (!value.startsWith('{') && value.length > 0) {
|
||||
value = '{' + value;
|
||||
}
|
||||
if (!value.endsWith('}')) {
|
||||
if (!value.endsWith('}') && value.length > 0) {
|
||||
value = value + '}';
|
||||
}
|
||||
} else if (type === 'json') {
|
||||
|
||||
Reference in New Issue
Block a user