update fix required for both branches of the if statement! - may as well have kept my original :) git push ispyinternet

This commit is contained in:
Richard O'flynn 2020-12-01 00:44:10 +00:00
commit b83d6ad930

View file

@ -18,7 +18,7 @@
selectedValues: _selectedValues,
update: ({ selected, value }) =>
_selectedValues.update((_) => {
if (_.includes(value)) {
if (_.includes(value) && !selected) {
return _.filter((i) => i !== value);
}
return selected ? [..._, value] : _; // else no update