Skip to content

Commit

Permalink
Merge pull request #5584 from Polymer/closure-__hasRegisterFinished
Browse files Browse the repository at this point in the history
Fix a minification issue with the `__hasRegisterFinished` property.
  • Loading branch information
kevinpschaaf authored Aug 27, 2019
2 parents 96c125e + 0541b21 commit f6ccc9d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/legacy/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ function GenerateClassFromInfo(info, Base, behaviors) {
*/
// only proceed if the generated class' prototype has not been registered.
const generatedProto = PolymerGenerated.prototype;
if (!generatedProto.hasOwnProperty('__hasRegisterFinished')) {
if (!generatedProto.hasOwnProperty(JSCompiler_renameProperty('__hasRegisterFinished', generatedProto))) {
generatedProto.__hasRegisterFinished = true;
// ensure superclass is registered first.
super._registered();
Expand Down
2 changes: 1 addition & 1 deletion lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
*/
_initializeProperties() {
let proto = Object.getPrototypeOf(this);
if (!proto.hasOwnProperty('__hasRegisterFinished')) {
if (!proto.hasOwnProperty(JSCompiler_renameProperty('__hasRegisterFinished', proto))) {
this._registered();
// backstop in case the `_registered` implementation does not set this
proto.__hasRegisterFinished = true;
Expand Down
4 changes: 2 additions & 2 deletions lib/mixins/properties-changed.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const PropertiesChanged = dedupingMixin(
*/
_createPropertyAccessor(property, readOnly) {
this._addPropertyToAttributeMap(property);
if (!this.hasOwnProperty('__dataHasAccessor')) {
if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataHasAccessor', this))) {
this.__dataHasAccessor = Object.assign({}, this.__dataHasAccessor);
}
if (!this.__dataHasAccessor[property]) {
Expand All @@ -131,7 +131,7 @@ export const PropertiesChanged = dedupingMixin(
* @override
*/
_addPropertyToAttributeMap(property) {
if (!this.hasOwnProperty('__dataAttributes')) {
if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataAttributes', this))) {
this.__dataAttributes = Object.assign({}, this.__dataAttributes);
}
if (!this.__dataAttributes[property]) {
Expand Down
2 changes: 1 addition & 1 deletion lib/mixins/properties-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const PropertiesMixin = dedupingMixin(superClass => {
* @nocollapse
*/
static get observedAttributes() {
if (!this.hasOwnProperty('__observedAttributes')) {
if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) {
register(this.prototype);
const props = this._properties;
this.__observedAttributes = props ? Object.keys(props).map(p => this.attributeNameForProperty(p)) : [];
Expand Down

0 comments on commit f6ccc9d

Please sign in to comment.