js-on-sx: bind returns dict-with-__callable__ for property mutation + length
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 47s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 47s
This commit is contained in:
@@ -373,9 +373,19 @@
|
||||
(< (len args) 1)
|
||||
(list)
|
||||
(js-list-slice args 1 (len args)))))
|
||||
(fn
|
||||
(&rest more)
|
||||
(js-call-with-this this-arg recv (js-list-concat bound more)))))))
|
||||
(let
|
||||
((target-len (js-fn-length recv)))
|
||||
(let
|
||||
((bound-len
|
||||
(let ((d (- target-len (len bound))))
|
||||
(if (< d 0) 0 d))))
|
||||
{:__callable__
|
||||
(fn
|
||||
(&rest more)
|
||||
(js-call-with-this this-arg recv (js-list-concat bound more)))
|
||||
:length bound-len
|
||||
:name "bound"
|
||||
:__js_bound_target__ recv}))))))
|
||||
((= key "toString")
|
||||
(let
|
||||
((override (js-dict-get-walk (get js-function-global "prototype") "toString")))
|
||||
|
||||
Reference in New Issue
Block a user