diff --git a/lib/mixins/properties-mixin.js b/lib/mixins/properties-mixin.js index 8a18d0d474..a62a6dfa99 100644 --- a/lib/mixins/properties-mixin.js +++ b/lib/mixins/properties-mixin.js @@ -86,8 +86,12 @@ export const PropertiesMixin = dedupingMixin(superClass => { if (!constructor.hasOwnProperty(JSCompiler_renameProperty('__ownProperties', constructor))) { let props = null; - if (constructor.hasOwnProperty(JSCompiler_renameProperty('properties', constructor)) && constructor.properties) { - props = normalizeProperties(constructor.properties); + if (constructor.hasOwnProperty(JSCompiler_renameProperty('properties', constructor))) { + const properties = constructor.properties; + + if (properties) { + props = normalizeProperties(properties); + } } constructor.__ownProperties = props; diff --git a/test/unit/polymer.properties-mixin.html b/test/unit/polymer.properties-mixin.html index 9424e295c8..30368e71b1 100644 --- a/test/unit/polymer.properties-mixin.html +++ b/test/unit/polymer.properties-mixin.html @@ -44,6 +44,8 @@ class MyElement extends PropertiesMixin(HTMLElement) { static get properties() { + this._calledProperties++; + return { prop: String, noStomp: String, @@ -111,6 +113,8 @@ MyElement.prototype._calledReady = 0; MyElement.prototype._callAttributeChangedCallback = 0; +MyElement.constructor.prototype._calledProperties = 0; + customElements.define('my-element', MyElement); window.MyElement = MyElement; @@ -236,6 +240,7 @@ assert.equal(el._calledConnectedCallback, 1); assert.equal(el._calledReady, 1); assert.equal(el._callAttributeChangedCallback, 0); + assert.equal(el.constructor._calledProperties, 1); }); test('listeners', function() {