Fix adding braces to nbt fileds constantly

This commit is contained in:
SPGoding
2019-12-21 17:34:40 -06:00
parent 6ff9e0de39
commit a329f6f643

View File

@@ -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') {