remember, in javascript 0 / nil / undefined evaluates to false, maybe this coud be formated as:
```
if state or state is 'default'
```
it's pretty much the same, so just keep it in mind