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

Make sure updateStyles works based on changes to customStyles and enhance api. #1916

Merged
merged 5 commits into from
Jun 23, 2015

Conversation

sorvell
Copy link
Contributor

@sorvell sorvell commented Jun 19, 2015

Fixes #1851: Include customStyle in the style host cache key so that changes to customStyle are recognized.

Fixes #1915: Include a customStyleProperties argument to updateStyles for convenience.

…t changes to customStyle are recognized.

Fixes #1915: Include a `customStyleProperties` argument to `updateStyles` for convenience.
this._properties = null;
if (properties) {
Polymer.Base.mixin(this.customStyle, properties);
}
// invalidate the cache
this._styleCache.clear();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users have reported on #1851 (comment) that Uncaught TypeError: Cannot read property 'clear' of undefined can be thrown if updateStyles is called too early. Should this just be guarded on this._styleCache being defined? Or is this handled elsewhere?

@kevinpschaaf
Copy link
Member

LGTM.

kevinpschaaf added a commit that referenced this pull request Jun 23, 2015
Make sure updateStyles works based on changes to customStyles and enhance api.
@kevinpschaaf kevinpschaaf merged commit 291a11d into master Jun 23, 2015
@kevinpschaaf kevinpschaaf deleted the fix-1851,1915 branch June 23, 2015 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants