“ [[mobx-state-tree]没有用于联合的匹配类型”错误

时间:2019-09-06 10:10:29

标签: mobx-state-tree

在我的电子应用程序的开发版本中,没有任何错误。但是,一旦我尝试在生产环境中运行它,我的localStorage数据似乎就出现了问题。 知道如何调试吗?

堆栈跟踪:

Uncaught Error: [mobx-state-tree] No matching type for union ({ id: identifier?; date: Date?; completed: boolean?; stepResults: { id: identifier; step: ((reference((ClickStep | DragStep)) | undefined?) | undefined?); matches: { position: { x: number; y: number }; value: number; templateSize: { width: number; height: number } }[]?; frameFilePath: (string | undefined?); success: boolean?; message: (string | undefined?) }[]?; deviceData: ({ abi: string; sdk: string; osVersion: string; size: string; serial: (string | undefined?); name: (string | undefined?); brand: (string | undefined?) } | undefined?) } | undefined?)
    at We (mobx-state-tree.module.js:2715)
    at t.instantiate (mobx-state-tree.module.js:4688)
    at mobx-state-tree.module.js:4085
    at mobx-state-tree.module.js:4217
    at Array.forEach (<anonymous>)
    at t.forAllProps (mobx-state-tree.module.js:4217)
    at t.initializeChildNodes (mobx-state-tree.module.js:4084)
    at new t (mobx-state-tree.module.js:1243)
    at xe (mobx-state-tree.module.js:2500)
    at t.instantiate (mobx-state-tree.module.js:4076)

1 个答案:

答案 0 :(得分:1)

弄清楚了。我试图以过时的格式加载持久数据。因为我在迁移数据后没有保留数据。