Fix for POST results not containing a value causing a crash.
parent
b90e66fd9d
commit
e1b8f765de
6
index.js
6
index.js
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue