Skip to content

Commit

Permalink
Wrap hasOwnProperty checks for __hasRegisterFinished in `JSCompil…
Browse files Browse the repository at this point in the history
…er_renameProperty()`.
  • Loading branch information
bicknellr committed Aug 24, 2019
1 parent 96c125e commit 9e90fd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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

0 comments on commit 9e90fd2

Please sign in to comment.