I have code that defines behavior based on which input the code is handeling at that moment. The code looks something like:
switch(inputOption.name) {
case 'NAME_1':
switch(inputOption.type.toLowerCase()) {
case 'radio':
//some code
case 'text':
//some code
...
case 'image':
//some code
default:
return inputOption.value;
break;
}
break;
default:
break;
}
The code also includes some cascading cases. The default option causes the error. The error is listed as
the default case is already defined
What is causing this error? The error shows up on the package folder, but the file shows no errors in the package view, but it shows errors when I open the file. I assumed it had something to do with the second default declaration, but it had no effect removing it.