Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make browser REPL work again

  • Loading branch information...
commit 76177d680942459ac1c1fda9c00f347d939adfa0 1 parent ac76743
@michalmarczyk michalmarczyk authored David Nolen committed
View
15 src/cljs/clojure/browser/dom.cljs
@@ -43,12 +43,13 @@
(log "string (-element " this " " attrs " " children ")")
(let [str-attrs (if (and (map? attrs) (seq attrs))
(reduce (fn [o [k v]]
- (log "m = " m)
- (log "k = " k)
- (log "v = " v)
- (when (or (keyword? k)
- (string? k))
- (aset o (name k) v)))
+ (let [o (if (nil? o) (js-obj) o)]
+ (log "o = " o)
+ (log "k = " k)
+ (log "v = " v)
+ (when (or (keyword? k)
+ (string? k))
+ (doto o (aset (name k) v)))))
(js-obj)
attrs)
nil)]
@@ -59,7 +60,7 @@
str-attrs
(map -element children))
(gdom/createDom (name this)
- str-attrs)))))
+ str-attrs)))))
Vector
(-element
View
2  src/cljs/clojure/browser/net.cljs
@@ -134,7 +134,7 @@ Includes a common API over XhrIo, CrossPageChannel, and Websockets."
(goog.net.xpc.CrossPageChannel.
(reduce (fn [sum [k v]]
(if-let [field (get xpc-config-fields k)]
- (aset sum field v)
+ (doto sum (aset field v))
sum))
(js-obj)
config))))
Please sign in to comment.
Something went wrong with that request. Please try again.