Skip to content
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

ObservableItem作成時にスキーマにid:trueを指定した項目があるときに無視されない #228

Closed
fukudayasuo opened this issue Jul 24, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@fukudayasuo
Copy link

item = h5.core.data.createObservableItem({v:{id:true}, v2:{id:true}});
item.set('v', 1);
// Error: Itemのsetterに渡された値がスキーマで指定された型・制約に違反しています。 違反したプロパティ=v(code=15102)

作成時にid制約は無視されているが、セット時にDataItemのid項目の制約(type指定なし時はstringのみ)を受けている。

また、id:trueを指定するとtypeが指定できず、詳細エラーメッセージもおかしくなっている。

item = h5.core.data.createObservableItem({v:{id:true,type:'number'}});
// Error: createObservableItemの引数に指定されたスキーマ定義オブジェクトが不正です。 詳細:1:code=undefined(code=15101)
fukudayasuo pushed a commit to hifive-labs/hifivemain that referenced this issue Jul 24, 2013
hifive#228 修正しました。テスト未追加。
(#227でテストケースのリファクタを行うので、その時に追加します。)
@fukudayasuo
Copy link
Author

6873bf1 テストケース追加しました。

@ghost ghost assigned fukudayasuo Jul 25, 2013
@simdy simdy closed this as completed Aug 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants