mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(focus-origin-monitor): complete stream when stopping monitor (#3404)
This commit is contained in:
committed by
Kara
parent
63d4359fca
commit
94adecdb5e
@@ -102,12 +102,15 @@ export class FocusOriginMonitor {
|
||||
* @param element The element to stop monitoring.
|
||||
*/
|
||||
unmonitor(element: Element): void {
|
||||
if (!this._elementInfo.has(element)) {
|
||||
return;
|
||||
let elementInfo = this._elementInfo.get(element);
|
||||
|
||||
if (elementInfo) {
|
||||
elementInfo.unlisten();
|
||||
elementInfo.subject.complete();
|
||||
|
||||
this._setClasses(element, null);
|
||||
this._elementInfo.delete(element);
|
||||
}
|
||||
this._elementInfo.get(element).unlisten();
|
||||
this._setClasses(element, null);
|
||||
this._elementInfo.delete(element);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user