diff options
Diffstat (limited to 'src/components/ui/Select.tsx')
-rw-r--r-- | src/components/ui/Select.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx index e8e305fdd..8ae2945ce 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select.tsx | |||
@@ -18,7 +18,7 @@ interface IProps { | |||
18 | multiple?: boolean; | 18 | multiple?: boolean; |
19 | } | 19 | } |
20 | 20 | ||
21 | // Can this file be merged into the './select/index.tsx' file? | 21 | // TODO: Can this file be merged into the './select/index.tsx' file? |
22 | @observer | 22 | @observer |
23 | class Select extends Component<IProps> { | 23 | class Select extends Component<IProps> { |
24 | private element: RefObject<HTMLSelectElement> = | 24 | private element: RefObject<HTMLSelectElement> = |
@@ -57,7 +57,7 @@ class Select extends Component<IProps> { | |||
57 | let selected = field.value; | 57 | let selected = field.value; |
58 | 58 | ||
59 | if (multiple) { | 59 | if (multiple) { |
60 | if (typeof field.value === 'string' && field.value.slice(0, 1) === '[') { | 60 | if (typeof field.value === 'string' && field.value.startsWith('[')) { |
61 | // Value is JSON encoded | 61 | // Value is JSON encoded |
62 | selected = JSON.parse(field.value); | 62 | selected = JSON.parse(field.value); |
63 | } else if (typeof field.value === 'object') { | 63 | } else if (typeof field.value === 'object') { |