diff --git a/src/graph.luau b/src/graph.luau index 4da31a4..029067c 100644 --- a/src/graph.luau +++ b/src/graph.luau @@ -119,6 +119,8 @@ end -- detect what nodes were referenced in the given callback and returns them in an array local function capture(fn: (U?) -> T, arg: U?): ({ Node }, T) + if reff then throw("recursive capture detected") end + if flags.strict then check_for_yield(fn, arg) end table.clear(refs)