Addendum, the problem also appears with the first menu item, I just didn't test it properly, my bad.
... aaand it was PEBCAK all along. I misspelled writeSettings (capital W). I retried it in the Web IDE (I was using the local windows version as it allows for Projects) and it finally showed a proper error message. I'll show myself out.
You're not alone... :p
I'm trying to program the settings for an app. All bigger numerical values show up and are selectable without any problems. However the last setting can be selected between Always/Alarms/Never. It shows up nicely in the menu but when I try to select an Item I get a horribly garbled error message in the console and nothig is saved to JSON. However the value in the variable is correctly set. The "Weekend Start Hour" menu works as it is supposed to however the "Follow DND" gives the error.
If I remove writeSettings() from line 31 the menu works as expected but of course it then doesn't save anything when switching apps.
This is the code in question:
And the error: