Apply 1 suggestion(s) to 1 file(s)
This commit is contained in:
parent
677724b76c
commit
94a76b3f5c
|
@ -34,6 +34,9 @@
|
|||
function setConf(parameterName, defaultValue) {
|
||||
if (typeof Conf[parameterName] === "undefined") {
|
||||
Conf[parameterName] = defaultValue;
|
||||
} else if (typeof Conf[parameterName] !== typeof defaultValue) {
|
||||
alert("Head's up - configuration " + parameterName + " does not have the right type. It should be a " + (typeof defaultValue) + ", it is a " + (typeof Conf[parameterName]));
|
||||
throw new Error("Wrong type for configuration " + parameterName + ", expected " + (typeof defaultValue) + ", got " + (typeof Conf[parameterName]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue