Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 6383b52

Browse files
bradrichjelbourn
authored andcommitted
fix(panel): Element reference error (#9375)
All references to `panelContainer` and `panelEl` have been verified as public, and the methods that contained the offending references have been corrected. Fixes #9374 Ping @ErinCoughlan
1 parent 87c4b01 commit 6383b52

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/components/panel/panel.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,14 +1105,14 @@ MdPanelRef.prototype.addClass = function(newClass, toElement) {
11051105
'To achieve the same results, use the panelContainer or panelEl ' +
11061106
'JQLite elements that are referenced in MdPanelRef.');
11071107

1108-
if (!this._panelContainer) {
1108+
if (!this.panelContainer) {
11091109
throw new Error('Panel does not exist yet. Call open() or attach().');
11101110
}
11111111

1112-
if (!toElement && !this._panelContainer.hasClass(newClass)) {
1113-
this._panelContainer.addClass(newClass);
1114-
} else if (toElement && !this._panelEl.hasClass(newClass)) {
1115-
this._panelEl.addClass(newClass);
1112+
if (!toElement && !this.panelContainer.hasClass(newClass)) {
1113+
this.panelContainer.addClass(newClass);
1114+
} else if (toElement && !this.panelEl.hasClass(newClass)) {
1115+
this.panelEl.addClass(newClass);
11161116
}
11171117
};
11181118

@@ -1135,14 +1135,14 @@ MdPanelRef.prototype.removeClass = function(oldClass, fromElement) {
11351135
'To achieve the same results, use the panelContainer or panelEl ' +
11361136
'JQLite elements that are referenced in MdPanelRef.');
11371137

1138-
if (!this._panelContainer) {
1138+
if (!this.panelContainer) {
11391139
throw new Error('Panel does not exist yet. Call open() or attach().');
11401140
}
11411141

1142-
if (!fromElement && this._panelContainer.hasClass(oldClass)) {
1143-
this._panelContainer.removeClass(oldClass);
1144-
} else if (fromElement && this._panelEl.hasClass(oldClass)) {
1145-
this._panelEl.removeClass(oldClass);
1142+
if (!fromElement && this.panelContainer.hasClass(oldClass)) {
1143+
this.panelContainer.removeClass(oldClass);
1144+
} else if (fromElement && this.panelEl.hasClass(oldClass)) {
1145+
this.panelEl.removeClass(oldClass);
11461146
}
11471147
};
11481148

@@ -1165,14 +1165,14 @@ MdPanelRef.prototype.toggleClass = function(toggleClass, onElement) {
11651165
'To achieve the same results, use the panelContainer or panelEl ' +
11661166
'JQLite elements that are referenced in MdPanelRef.');
11671167

1168-
if (!this._panelContainer) {
1168+
if (!this.panelContainer) {
11691169
throw new Error('Panel does not exist yet. Call open() or attach().');
11701170
}
11711171

11721172
if (!onElement) {
1173-
this._panelContainer.toggleClass(toggleClass);
1173+
this.panelContainer.toggleClass(toggleClass);
11741174
} else {
1175-
this._panelEl.toggleClass(toggleClass);
1175+
this.panelEl.toggleClass(toggleClass);
11761176
}
11771177
};
11781178

0 commit comments

Comments
 (0)