Skip to content

Commit a254fea

Browse files
committed
fix: assert fail when no errors in callback due to wong if condition
1 parent c867835 commit a254fea

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lua/sync.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ local function async(func)
4343
error("unhandled error " .. thunk)
4444
end
4545

46-
if co.status(thread) == "dead" and parent_handler_callback then
47-
parent_handler_callback(thunk)
46+
assert(ok, thunk)
47+
if co.status(thread) == "dead" then
48+
if parent_handler_callback then
49+
parent_handler_callback(thunk)
50+
end
4851
else
4952
assert(type(thunk) == "function", "type error :: expected func")
5053
thunk(step)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy