| 641 | 641 | /** @type {(string|number)[]} */ |
| 642 | 642 | let values = Array.isArray(value) ? value : value.split(' '); |
| 643 | 643 | |
| 644 | 644 | // If a JSONan array of strings was provided as the only value, convert it to an array |
| 645 | 645 | if (values.length === 1 && typeof values[0] === 'string' && values[0].startsWith('[')) { |
| 646 | + if (values[0].startsWith('[')) { |
| 647 | + // JSON-style array |
| 646 | 648 | values = convertValueType(values[0], 'array'); |
| 649 | + } else { |
| 650 | + // Space-separated string |
| 651 | + values = values[0].split(' '); |
| 652 | + } |
| 647 | 653 | } |
| 648 | 654 | |
| 649 | 655 | const array = values.map(i => typeof i === 'string' ? i.trim() : i) |