js-on-sx: fn proto chain walks through functions; fn.prototype = X persists
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
This commit is contained in:
@@ -3300,6 +3300,8 @@
|
||||
(cond
|
||||
((= obj nil) js-undefined)
|
||||
((js-undefined? obj) js-undefined)
|
||||
((or (= (type-of obj) "lambda") (= (type-of obj) "function") (= (type-of obj) "component"))
|
||||
(js-dict-get-walk (get js-function-global "prototype") skey))
|
||||
((not (= (type-of obj) "dict")) js-undefined)
|
||||
((dict-has? obj skey) (get obj skey))
|
||||
((dict-has? obj "__proto__")
|
||||
@@ -3383,6 +3385,12 @@
|
||||
(dict-set! obj sk val)
|
||||
val)))
|
||||
((= (type-of obj) "list") (do (js-list-set! obj key val) val))
|
||||
((and
|
||||
(or (= (type-of obj) "lambda") (= (type-of obj) "function") (= (type-of obj) "component"))
|
||||
(= (js-to-string key) "prototype"))
|
||||
(let
|
||||
((id (js-ctor-id obj)))
|
||||
(begin (dict-set! __js_proto_table__ id val) val)))
|
||||
(else val))))
|
||||
(define
|
||||
js-list-set!
|
||||
|
||||
Reference in New Issue
Block a user