diff util/adhoc.lua @ 11200:bf8f2da84007

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2020 22:31:25 +0100
parents 49312378ba1d
children e10567199f02
line wrap: on
line diff
--- a/util/adhoc.lua	Thu Nov 05 22:27:17 2020 +0100
+++ b/util/adhoc.lua	Thu Nov 05 22:31:25 2020 +0100
@@ -2,7 +2,7 @@
 
 local function new_simple_form(form, result_handler)
 	return function(self, data, state)
-		if state then
+		if state or data.form then
 			if data.action == "cancel" then
 				return { status = "canceled" };
 			end
@@ -16,7 +16,7 @@
 
 local function new_initial_data_form(form, initial_data, result_handler)
 	return function(self, data, state)
-		if state then
+		if state or data.form then
 			if data.action == "cancel" then
 				return { status = "canceled" };
 			end