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

Undefined partial names cause TypeError to be thrown #2254

Closed
rpkilby opened this issue Jan 28, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@rpkilby
Copy link
Contributor

commented Jan 28, 2016

We have a bug in our code that results in an undefined partial name for a split second. This causes a TypeError to be thrown before assertAsset can display a meaningful warning. fiddle

The problem is that resolveAsset assumes that the asset id will be a string, even though this is not necessarily the case when the id is dynamically bound. A few possible solutions:

  • Force the asset id to a string before camelization
  • Only perform camelCase and PascalCase lookups if isString(id)
  • Assert that the asset id is a string, although all calling code would now have to handle that case. Partial/component/other asset registration would probably need to do the same as the following is technically legal: Vue.partial({}, '<div>lolol</div>'

@yyx990803 yyx990803 closed this in 20deeee Jan 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.