fix(core): wrapEventObservable (#2660)

* fix wrapEventObservable

* fix lint
This commit is contained in:
Nicolas HENRY 2018-08-27 01:38:22 +02:00 committed by Ibby Hadeed
parent 110fb7e8e1
commit bd345818f8

View File

@ -167,11 +167,7 @@ function wrapObservable(
* @returns {Observable}
*/
function wrapEventObservable(event: string, element: any): Observable<any> {
if (element) {
get(window, element);
} else {
element = window;
}
element = element ? get(window, element) : window;
return fromEvent(element, event);
}