fix(tracker): drop functions and methods from state in mobx
This commit is contained in:
parent
a40e0a0c26
commit
68f4b93081
2 changed files with 8 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@openreplay/tracker-mobx",
|
"name": "@openreplay/tracker-mobx",
|
||||||
"description": "Tracker plugin for MobX events recording",
|
"description": "Tracker plugin for MobX events recording",
|
||||||
"version": "4.0.1",
|
"version": "4.0.2",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"mobx",
|
"mobx",
|
||||||
"logging",
|
"logging",
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,14 @@ const compute = ev => {
|
||||||
|
|
||||||
|
|
||||||
const observeAction = ev => {
|
const observeAction = ev => {
|
||||||
|
const state = {}
|
||||||
|
for (let property in ev.object) {
|
||||||
|
if (typeof property !== 'function') {
|
||||||
|
state[property] = ev.object[property]
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
state: ev.object,
|
state,
|
||||||
type: ev.type,
|
type: ev.type,
|
||||||
property: ev.name,
|
property: ev.name,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue