Mobx: object with 'toString' key is ignored by ObservableArray

Created on 23 Jul 2018  路  4Comments  路  Source: mobxjs/mobx

Hi, I can't assign object with 'toString' key to observable array.

data from server
data from server

observable array
observable array

demo: https://codesandbox.io/s/1yxyzwjz14
I am using: "mobx": "^4.3.1", "mobx-react": "5.2.2",

馃悰 bug

All 4 comments

Minimal repro: https://codesandbox.io/s/pppj0njj8q
toString is defined on target object as observable prop, but it has "default descriptor" so I quess there is a call like: Object.defineProperty(target, "toString", undefined) somewhere...
EDIT: As @mayorovp pointed out it's actually Object.defineProperty(target, "toString", func) (one would expect it to throw...)

The bug lives here: generateObservablePropConfig

Confirmed as bug (sorry for the late follow up!), investigating a solution

Fix has been released as: 5.1.2 / 4.4.2

Was this page helpful?
0 / 5 - 0 ratings