fix(tracker): drop functions and methods from state in mobx

This commit is contained in:
nick-delirium 2023-05-24 17:09:20 +02:00
parent a40e0a0c26
commit 68f4b93081
2 changed files with 8 additions and 2 deletions

View file

@ -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",

View file

@ -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,
} }