(options: SelectorOption[], option?: SelectorOption | null)
| 95 | } |
| 96 | |
| 97 | export function mergeOption(options: SelectorOption[], option?: SelectorOption | null) { |
| 98 | if (!option) return options |
| 99 | if (options.some((item) => item.id === option.id)) { |
| 100 | return options |
| 101 | } |
| 102 | return [option, ...options] |
| 103 | } |
no outgoing calls
no test coverage detected