diff options
author | Li Jin <dragon-fly@qq.com> | 2022-02-15 09:55:18 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-02-15 09:55:18 +0800 |
commit | f4e2286da2b0212b0a7ac76821203bd398cfac5b (patch) | |
tree | 74e009d36b1cd67426ba729c8cb073f414f86cbf /spec/outputs/backcall.lua | |
parent | ddb0b9deb720368a425d00bce0c0352469b55911 (diff) | |
download | yuescript-f4e2286da2b0212b0a7ac76821203bd398cfac5b.tar.gz yuescript-f4e2286da2b0212b0a7ac76821203bd398cfac5b.tar.bz2 yuescript-f4e2286da2b0212b0a7ac76821203bd398cfac5b.zip |
fix a global variable check case.
Diffstat (limited to 'spec/outputs/backcall.lua')
-rw-r--r-- | spec/outputs/backcall.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/outputs/backcall.lua b/spec/outputs/backcall.lua index 9f7ec29..3a4c5e9 100644 --- a/spec/outputs/backcall.lua +++ b/spec/outputs/backcall.lua | |||
@@ -31,16 +31,19 @@ do | |||
31 | end)()) | 31 | end)()) |
32 | end | 32 | end |
33 | do | 33 | do |
34 | if http ~= nil then | 34 | do |
35 | http.get("ajaxtest", function(data) | 35 | local _obj_0 = http |
36 | body[".result"]:html(data) | 36 | if _obj_0 ~= nil then |
37 | return http.post("ajaxprocess", data, function(processed) | 37 | _obj_0.get("ajaxtest", function(data) |
38 | body[".result"]:append(processed) | 38 | body[".result"]:html(data) |
39 | return setTimeout(1000, function() | 39 | return http.post("ajaxprocess", data, function(processed) |
40 | return print("done") | 40 | body[".result"]:append(processed) |
41 | return setTimeout(1000, function() | ||
42 | return print("done") | ||
43 | end) | ||
41 | end) | 44 | end) |
42 | end) | 45 | end) |
43 | end) | 46 | end |
44 | end | 47 | end |
45 | end | 48 | end |
46 | do | 49 | do |