mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
fix(platform): better detect platforms + css API
fixes #15165 fixes #15116
This commit is contained in:
@ -797,29 +797,21 @@ export class Nav implements NavOutlet {
|
||||
|
||||
...opts
|
||||
};
|
||||
const trns = await transition(animationOpts);
|
||||
return this.transitionFinish(trns, enteringView, leavingView, opts);
|
||||
const { hasCompleted } = await transition(animationOpts);
|
||||
return this.transitionFinish(hasCompleted, enteringView, leavingView, opts);
|
||||
}
|
||||
|
||||
private transitionFinish(
|
||||
trans: Animation | null,
|
||||
hasCompleted: boolean,
|
||||
enteringView: ViewController,
|
||||
leavingView: ViewController | undefined,
|
||||
opts: NavOptions
|
||||
): NavResult {
|
||||
const hasCompleted = trans ? trans.hasCompleted : true;
|
||||
|
||||
const cleanupView = hasCompleted ? enteringView : leavingView;
|
||||
if (cleanupView) {
|
||||
this.cleanup(cleanupView);
|
||||
}
|
||||
|
||||
// this is the root transition
|
||||
// it's safe to destroy this transition
|
||||
if (trans) {
|
||||
trans.destroy();
|
||||
}
|
||||
|
||||
return {
|
||||
hasCompleted,
|
||||
requiresTransition: true,
|
||||
|
||||
Reference in New Issue
Block a user