Skip to content

Commit

Permalink
fix: add hasTokenizedOnce to DOMStylesReader's constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 1, 2021
1 parent e4e9b1f commit 2641ae6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/mixins/dom-styles-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export default class DOMStylesReader {
* @access private
*/
this.domStylesCache = {}

/**
* Set to true once tokenized
* @access private
*/
this.hasTokenizedOnce = false
}

/**
Expand Down Expand Up @@ -100,9 +106,9 @@ export default class DOMStylesReader {
* unused
*/
invalidateIfFirstTokenization () {
if (this.constructor.hasTokenizedOnce) { return }
if (this.hasTokenizedOnce) { return }
this.invalidateDOMStylesCache()
this.constructor.hasTokenizedOnce = true
this.hasTokenizedOnce = true
}
}

Expand Down

0 comments on commit 2641ae6

Please sign in to comment.