I also had this problem. Easy way to get around it: add a +
sign before your variable in the switch, i.e.
switch (+editMode) {
case EditMode.Delete:
...
break;
case EditMode.Edit:
...
break;
default:
...
break;
}