Fix for POST results not containing a value causing a crash.

master
kts of kettek 2015-10-27 13:52:53 -07:00
parent b90e66fd9d
commit e1b8f765de
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ var QCore = function() {
split = parts[i].split('=');
key = split[0];
value = split[1];
req.post[key] = decodeURIComponent(value.replace(/[+]/g, function(c) { return ' '; }));
if (typeof value !== 'undefined') {
req.post[key] = decodeURIComponent(value.replace(/[+]/g, function(c) { return ' '; }));
} else {
req.post[key] = '';
}
}
for (var i = 0, keys = Object.keys(acts[act]); i < keys.length; i++) {
acts[act][i](req, res);