cljs-oops icon indicating copy to clipboard operation
cljs-oops copied to clipboard

oset being strict

Open wilkerlucio opened this issue 4 years ago • 0 comments

Hello,

I'm trying to use oops to interop with Automerge.

This snippet fails to make an update:

(oset+ doc "todos" (str idx) "done" true)

The browser complaints that: data property descriptor has writable=false

But if I try something a bit different:

(gobj/set (oget+ doc "todos" (str idx)) "done" done)

This works just fine, the google impl is a single obj[key] = value. I wonder if there is a way to make oops work directly without having to fall back into Closure helpers.

wilkerlucio avatar Aug 15 '21 20:08 wilkerlucio