summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-03-07 16:24:05 +0000
committerSteven Barth <steven@midlink.org>2009-03-07 16:24:05 +0000
commit25da62f8ffab01a8e728bf7b4d4704191a07da61 (patch)
tree855edc7ceebf8a9e895be06b2a19aa9bc3c8c304 /libs/web/luasrc/dispatcher.lua
parent1ed9be270bfcded11c0c6f47de4d005d4e788746 (diff)
Don't compare cstate if there is none
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index a620925789..483b7b276c 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -639,7 +639,7 @@ local function _cbi(self, ...)
res.autoapply = config.autoapply
end
local cstate = res:parse()
- if not state or cstate < state then
+ if cstate and not state or cstate < state then
state = cstate
end
end
@@ -709,7 +709,7 @@ local function _form(self, ...)
for i, res in ipairs(maps) do
local cstate = res:parse()
- if not state or cstate < state then
+ if cstate and not state or cstate < state then
state = cstate
end
end