Skip to content

Commit f9c582a

Browse files
fxckjelbourn
authored andcommitted
chore: unsubscribe from rxjs subscriptions (#1549)
1 parent e7f6910 commit f9c582a

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

src/lib/core/line/line.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class MdLineSetter {
2525
});
2626
}
2727

28-
2928
private _setLineClass(count: number): void {
3029
this._resetClasses();
3130
if (count === 2 || count === 3) {

src/lib/dialog/dialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class MdDialog {
8888
let dialogRef = <MdDialogRef<T>> new MdDialogRef(overlayRef);
8989

9090
// When the dialog backdrop is clicked, we want to close it.
91-
overlayRef.backdropClick().subscribe(() => dialogRef.close());
91+
overlayRef.backdropClick().first().subscribe(() => dialogRef.close());
9292

9393
// Set the dialogRef to the container so that it can use the ref to close the dialog.
9494
dialogContainer.dialogRef = dialogRef;

src/lib/icon/icon.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked {
122122
if (changedInputs.indexOf('svgIcon') != -1 || changedInputs.indexOf('svgSrc') != -1) {
123123
if (this.svgIcon) {
124124
const [namespace, iconName] = this._splitIconName(this.svgIcon);
125-
this._mdIconRegistry.getNamedSvgIcon(iconName, namespace).subscribe(
125+
this._mdIconRegistry.getNamedSvgIcon(iconName, namespace).first().subscribe(
126126
svg => this._setSvgElement(svg),
127127
(err: any) => console.log(`Error retrieving icon: ${err}`));
128128
} else if (this.svgSrc) {
129-
this._mdIconRegistry.getSvgIconFromUrl(this.svgSrc).subscribe(
129+
this._mdIconRegistry.getSvgIconFromUrl(this.svgSrc).first().subscribe(
130130
svg => this._setSvgElement(svg),
131131
(err: any) => console.log(`Error retrieving icon: ${err}`));
132132
}

src/lib/sidenav/sidenav.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export class MdSidenav {
6666
/** Event emitted when the sidenav is fully closed. */
6767
@Output('close') onClose = new EventEmitter<void>();
6868

69-
7069
/**
7170
* @param _elementRef The DOM element reference. Used for transition and width calculation.
7271
* If not available we do not hook on transitions.

0 commit comments

Comments
 (0)