if `list=[]` then `list.length > 1 ? list.uniq : list` also returns `[]`. I thought that is what you want. Sounds me like that the test is wrong. I would fix the test instead of adding this condition.