mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(ViewController): avoid deep copy in dismiss() that can turn into an infinite loop
For some reason, apparently related to the NavOptions.ev field, this deep copy was turning into an infinite loop on a Nexus 7 / android 5.1.1 webview. Replace with a non-deep copy since the deep copy is unnecessary in this case.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ComponentRef, ElementRef, EventEmitter, Output, Renderer } from '@angular/core';
|
||||
|
||||
import { Footer, Header } from '../components/toolbar/toolbar';
|
||||
import { isPresent, merge } from '../util/util';
|
||||
import { isPresent, assign } from '../util/util';
|
||||
import { Navbar } from '../components/navbar/navbar';
|
||||
import { NavControllerBase } from './nav-controller-base';
|
||||
import { NavOptions, ViewState } from './nav-util';
|
||||
@@ -184,7 +184,7 @@ export class ViewController {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
|
||||
let options = merge({}, this._leavingOpts, navOptions);
|
||||
let options = assign({}, this._leavingOpts, navOptions);
|
||||
this._onWillDismiss && this._onWillDismiss(data, role);
|
||||
return this._nav.remove(this._nav.indexOf(this), 1, options).then(() => {
|
||||
this._onDidDismiss && this._onDidDismiss(data, role);
|
||||
|
||||
Reference in New Issue
Block a user