lib.isFunction: no error on non-function __functor

This commit is contained in:
Shahar "Dawn" Or
2026-08-14 23:53:28 +07:00
parent 703a4f5e00
commit 707263e1ba

View File

@@ -1128,7 +1128,7 @@ in
let
isFunction = builtins.isFunction;
in
f: isFunction f || (f ? __functor && isFunction (f.__functor f));
f: isFunction f || (f ? __functor && isFunction f.__functor && isFunction (f.__functor f));
/**
`mirrorFunctionArgs f g` creates a new function `g'` with the same behavior as `g` (`g' x == g x`)