Skip to content

Commit 9e90fd2

Browse files
committed
Wrap hasOwnProperty checks for __hasRegisterFinished in JSCompiler_renameProperty().
1 parent 96c125e commit 9e90fd2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/legacy/class.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ function GenerateClassFromInfo(info, Base, behaviors) {
301301
*/
302302
// only proceed if the generated class' prototype has not been registered.
303303
const generatedProto = PolymerGenerated.prototype;
304-
if (!generatedProto.hasOwnProperty('__hasRegisterFinished')) {
304+
if (!generatedProto.hasOwnProperty(JSCompiler_renameProperty('__hasRegisterFinished', generatedProto))) {
305305
generatedProto.__hasRegisterFinished = true;
306306
// ensure superclass is registered first.
307307
super._registered();

lib/legacy/legacy-element-mixin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
179179
*/
180180
_initializeProperties() {
181181
let proto = Object.getPrototypeOf(this);
182-
if (!proto.hasOwnProperty('__hasRegisterFinished')) {
182+
if (!proto.hasOwnProperty(JSCompiler_renameProperty('__hasRegisterFinished', proto))) {
183183
this._registered();
184184
// backstop in case the `_registered` implementation does not set this
185185
proto.__hasRegisterFinished = true;

0 commit comments

Comments
 (0)