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

Projects
None yet
2 participants
@tgeorgiev
Copy link

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

commented Jan 18, 2016

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

stringToFragment not using cache when templateString != templateStrin…
…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.

@tgeorgiev tgeorgiev force-pushed the tgeorgiev:dev branch from 27c9f08 to 88352e7 Jan 18, 2016

yyx990803 added a commit that referenced this pull request Jan 18, 2016

Merge pull request #2182 from tgeorgiev/dev
stringToFragment not using cache when templateString != templateStrin…

@yyx990803 yyx990803 merged commit 45646f1 into vuejs:dev Jan 18, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@yyx990803

This comment has been minimized.

Copy link
Member

commented Jan 18, 2016

👍 thanks!

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.