ClojureScript

js->clj does not work on objects with null prototype

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9.908
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Version: 1.9.946
Follow up from issue CLJS-1998

cljs.user=> (js->clj #js {})
{}

cljs.user=> (js->clj (.create js/Object nil))
#object[Object]

cljs.user=> (keys (js->clj (.create js/Object nil)))
org.mozilla.javascript.EcmaError: TypeError: Cannot find default value for object. (.cljs_rhino_repl/goog/../.cljs_rhino_repl/cljs/core.js#9915)
	 (.cljs_rhino_repl/cljs/core.cljs:2930:10)
	 cljs$core$seq (.cljs_rhino_repl/cljs/core.cljs:1212:13)
	 cljs$core$keys (.cljs_rhino_repl/cljs/core.cljs:8648:3)
	 (NO_SOURCE_FILE <cljs repl>:1:0)
	 (NO_SOURCE_FILE <cljs repl>:1:0)

Activity

Mike Fikes made changes -
Field Original Value New Value
Description Version: 1.9.946
Follow up from issue CLJS-1998

cljs.user=> (js->clj #js {})
{}

cljs.user=> (js->clj (.create js/Object nil))
#object[Object]

cljs.user=> (keys (js->clj (.create js/Object nil)))
org.mozilla.javascript.EcmaError: TypeError: Cannot find default value for object. (.cljs_rhino_repl/goog/../.cljs_rhino_repl/cljs/core.js#9915)
(.cljs_rhino_repl/cljs/core.cljs:2930:10)
cljs$core$seq (.cljs_rhino_repl/cljs/core.cljs:1212:13)
cljs$core$keys (.cljs_rhino_repl/cljs/core.cljs:8648:3)
(NO_SOURCE_FILE <cljs repl>:1:0)
(NO_SOURCE_FILE <cljs repl>:1:0)
Version: 1.9.946
Follow up from issue CLJS-1998

{code}
cljs.user=> (js->clj #js {})
{}

cljs.user=> (js->clj (.create js/Object nil))
#object[Object]

cljs.user=> (keys (js->clj (.create js/Object nil)))
org.mozilla.javascript.EcmaError: TypeError: Cannot find default value for object. (.cljs_rhino_repl/goog/../.cljs_rhino_repl/cljs/core.js#9915)
(.cljs_rhino_repl/cljs/core.cljs:2930:10)
cljs$core$seq (.cljs_rhino_repl/cljs/core.cljs:1212:13)
cljs$core$keys (.cljs_rhino_repl/cljs/core.cljs:8648:3)
(NO_SOURCE_FILE <cljs repl>:1:0)
(NO_SOURCE_FILE <cljs repl>:1:0)
{code}
Mike Fikes made changes -
Affects Version/s 1.9.908 [ 11361 ]
David Nolen made changes -
Priority Major [ 3 ] Critical [ 2 ]
David Nolen made changes -
Priority Critical [ 2 ] Major [ 3 ]

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated: