Skip to content

Commit

Permalink
fix(core): wrapEventObservable (#2660)
Browse files Browse the repository at this point in the history
* fix wrapEventObservable

* fix lint
  • Loading branch information
nicolashenry authored and ihadeed committed Aug 26, 2018
1 parent 110fb7e commit bd34581
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/@ionic-native/core/decorators/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit bd34581

Please sign in to comment.