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

stringToFragment not using cache when templateString != templateStrin… #2182

Merged
merged 1 commit into from Jan 18, 2016

Conversation

@tgeorgiev
Copy link

@tgeorgiev tgeorgiev commented Jan 18, 2016

…g.trim()

The issue was that initially we check the cache by an un-trimmed key, while later on, before putting a value in the cache, we trim the key. This would lead to the fragment of a templateString that has spaces at the beginning or the end, not to be retrieved from the cache.

@yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Jan 18, 2016

Thanks, one issue here is that we want to use the raw behavior for text-only templates. So we should probably assign the trimmed string to a separate variable so that we can use the original string when a text-only string is detected.

@tgeorgiev
Copy link
Author

@tgeorgiev tgeorgiev commented Jan 18, 2016

Oh, I see what you mean. I will fix this and update the request shortly. Thanks!

…g.trim()

The issue was that initially we check the cache by an un-trimmed key, while later on, before putting a value in the cache, we trim the key. This would lead to the fragment of a templateString that has spaces at the beginning or the end, not to be retrieved from the cache.

The fix us to use the original, unchanged value as the key.
yyx990803 added a commit that referenced this issue Jan 18, 2016
stringToFragment not using cache when templateString != templateStrin…
@yyx990803 yyx990803 merged commit 45646f1 into vuejs:dev Jan 18, 2016
1 check passed
@yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Jan 18, 2016

👍 thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants