Skip to content

type: Array, parse 返回异常 #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mlinquan opened this issue Apr 29, 2021 · 0 comments
Open

type: Array, parse 返回异常 #11

mlinquan opened this issue Apr 29, 2021 · 0 comments

Comments

@mlinquan
Copy link

import Model from 'js-model'

const modelTest = new Model({
  a: {
      type: Array,
      defalut: []
  }
})

console.log(modelTest.parse({}))

返回结果

{
    a: {
      type: null,
      defalut: Array(0)
    }
}

正常不应该是返回

{
    a: []
}

吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant