Fix numeric series parsing Closes #3043

c8a28137e0ffab3d62be45205bde011ffe40f91b

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +8 -2Showing whitespace changes
public/scripts/variables.js+8 -2
@@ -641,9 +641,15 @@ function parseNumericSeries(value, scope = null) {
641 /** @type {(string|number)[]} */641 /** @type {(string|number)[]} */
642 let values = Array.isArray(value) ? value : value.split(' ');642 let values = Array.isArray(value) ? value : value.split(' ');
643643
644 // If a JSON array was provided as the only value, convert it to an array644 // If an array of strings was provided as the only value, convert it to an array
645 if (values.length === 1 && typeof values[0] === 'string' && values[0].startsWith('[')) {645 if (values.length === 1 && typeof values[0] === 'string') {
646 if (values[0].startsWith('[')) {
647 // JSON-style array
646 values = convertValueType(values[0], 'array');648 values = convertValueType(values[0], 'array');
649 } else {
650 // Space-separated string
651 values = values[0].split(' ');
652 }
647 }653 }
648654
649 const array = values.map(i => typeof i === 'string' ? i.trim() : i)655 const array = values.map(i => typeof i === 'string' ? i.trim() : i)