missing commits from last commit 7eb3d0b8b0

This commit is contained in:
logsol 2014-03-19 02:40:03 +01:00
parent 7eb3d0b8b0
commit 039213cf50
11 changed files with 257 additions and 430 deletions

View file

@ -26,10 +26,18 @@ function (Exception) {
return preset;
}
// FIXME there is a bad bug here, the preset is being manipulated by reference, so no config can be used!
// hotfix for the bug
preset = JSON.parse(JSON.stringify(preset));
for (var key in options) {
if(!preset.hasOwnProperty(key)) {
preset[key] = options[key];
} else {
if(options[key] === undefined) {
continue;
}
if(options[key].constructor !== Object) {
preset[key] = options[key];
} else {