[Bug] Error message in Dashboard

When loading the Dashboard, I just got the following error message from “code.js”

Uncaught TypeError: Cannot read property ‘substr’ of undefined.
line 445 column 58

The console additionally says:
Uncaught TypeError: Cannot read property ‘substr’ of undefined
at HTMLDivElement.inpSubdomain.onchange (code.js:445)

The code section looks as follows:

inpSubdomain.onchange = function() {
    var OK = true;
    var s = inpSubdomain.value;
    if (s == "") OK = false;
>>>    if ("0123456789abcdefghijklmnopqrstuvwxyz".indexOf(s.substr(0, 1)) == -1) OK = false;
    for (i = 1; i < s.length; i++) {
        if ("0123456789-abcdefghijklmnopqrstuvwxyz".indexOf(s.substr(i, 1)) == -1) OK = false;
    if (!OK) {
        $("#inpSubdomain .help-block").removeClass("hidden");
    } else {
        $("#inpSubdomain .help-block").addClass("hidden");
    if (s.length > 63) OK = false;
    return OK;

The faulty line has been marked with “>>>”

Perhaps, this may be useful for you.

Can you reproduce this?

I don’t know - it happens once in a while but, right now, I have no idea under which conditions. I thought, you could have an idea if you see the source…

I’ll have a look - I was hoping you knew how to reproduce it already. :slight_smile:

Ok, should be fixed.

Great, thank you!