summaryrefslogtreecommitdiff
path: root/share/server/render.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/server/render.js')
-rw-r--r--share/server/render.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/server/render.js b/share/server/render.js
index 1e341ec7..9dcfbcd6 100644
--- a/share/server/render.js
+++ b/share/server/render.js
@@ -210,6 +210,11 @@ var Render = (function() {
return s;
};
+ function isDocRequestPath(info) {
+ var path = info.path;
+ return path.length > 5;
+ };
+
function runShow(fun, ddoc, args) {
try {
resetList();
@@ -239,7 +244,7 @@ var Render = (function() {
throw(["error", "render_error", "undefined response from show function"]);
}
} catch(e) {
- if(args[0] === null) {
+ if (args[0] === null && isDocRequestPath(args[1])) {
throw(["error", "not_found", "document not found"]);
} else {
renderError(e, fun.toSource());