summaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/routes/index.js b/routes/index.js
index efed59c..5f2c79c 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -42,7 +42,10 @@ exports.render = function(req, res) {
var parsedBody;
try {
parsedBody = JSON.parse(body);
- } catch(e) { sendErr('Unable to parse JSON: ' + e); }
+ } catch(e) {
+ sendErr('Unable to parse JSON: ' + e);
+ return;
+ }
var collection = collection_json.fromObject(parsedBody).collection;
var isUrl = function(u) {
try {