-
Notifications
You must be signed in to change notification settings - Fork 642
Closed
Description
Bug report
- I've checked documentation and searched for existing issues
-
I've made sure my project is based on the latest MST versionnot applicable - Fork this code sandbox or another minimal reproduction.
Sandbox link or minimal reproduction code
https://stackblitz.com/edit/in-regression-mobx-state-tree?file=index.html
import { types } from "mobx-state-tree";
const User = types
.model({
name: ""
})
.actions(self => ({
setName(name) {
self.name = name;
}
}));
const john = User.create();
console.log("This should be true:", "setName" in john);
Describe the expected behavior
The in
operator should detect actions. I've observed that the regression appeared somewhere between version 4.0.2 and 4.0.3.
Describe the observed behavior
The in
operator doesn't detect actions on instances of the model.
Metadata
Metadata
Assignees
Labels
No labels