Browse Source

Cache the return of `getClearEl`. Fixes #768

pull/1035/head
Artur Arseniev 9 years ago
parent
commit
d0023f9555
  1. 6
      src/style_manager/view/PropertyView.js

6
src/style_manager/view/PropertyView.js

@ -123,7 +123,11 @@ module.exports = Backbone.View.extend({
* @return {HTMLElement} * @return {HTMLElement}
*/ */
getClearEl() { getClearEl() {
return this.el.querySelector(`[${clearProp}]`); if (!this.clearEl) {
this.clearEl = this.el.querySelector(`[${clearProp}]`);
}
return this.clearEl;
}, },
/** /**

Loading…
Cancel
Save