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

Fix the viewModel -> ViewModel warning #73

Merged
merged 1 commit into from
Jan 2, 2018
Merged

Conversation

chasenlehara
Copy link
Member

@chasenlehara chasenlehara commented Dec 28, 2017

This fixes a warning from can-component about assigning a DefineMap to the viewModel instead of ViewModel (capital V).

Warnings shown when running the tests before this change:
before

After this change:
after

Fixes #58

This fixes a warning from can-component about assigning a DefineMap to the `viewModel` instead of `ViewModel` (capital V).

Fixes #58
@matthewp
Copy link
Contributor

lgtm

@chasenlehara chasenlehara merged commit cd45d16 into master Jan 2, 2018
@chasenlehara chasenlehara deleted the 58-viewmodel-warning branch January 2, 2018 16:39
@bmomberger-bitovi
Copy link

@chasenlehara what happens now when you export a plain object from the view-model script? Is there a different warning? does it still work as intended (extending types.DefaultMap)?

@chasenlehara
Copy link
Member Author

Providing a plain object as the ViewModel works, but I have a PR to deprecate it in can-component 3 because the default changes in 4.0 and I don’t think we want people relying on it being a specific type anymore.

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

Successfully merging this pull request may close these issues.

Warning in can-component about assigning a DefineMap to the viewModel
3 participants