mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(animation): enable backwards compatibility for overlay animations (#19160)
* fix backwards compat for overlays * fix overlay * Address navigation edge case
This commit is contained in:
@ -190,11 +190,15 @@ const overlayAnimation = async (
|
||||
/**
|
||||
* TODO: Remove AnimationBuilder
|
||||
*/
|
||||
const animation = await import('./animation/old-animation').then(mod => mod.create(animationBuilder as AnimationBuilder, aniRoot, opts));
|
||||
const isAnimationBuilder = (animation as any).fill === undefined;
|
||||
|
||||
if (!isAnimationBuilder) {
|
||||
(animation as any).fill('both');
|
||||
let animation;
|
||||
let isAnimationBuilder = true;
|
||||
try {
|
||||
const mod = await import('./animation/old-animation');
|
||||
animation = await mod.create(animationBuilder as AnimationBuilder, aniRoot, opts);
|
||||
} catch (err) {
|
||||
animation = (animationBuilder as IonicAnimationInterface)(aniRoot, opts);
|
||||
animation.fill('both');
|
||||
isAnimationBuilder = false;
|
||||
}
|
||||
|
||||
overlay.animation = animation;
|
||||
|
Reference in New Issue
Block a user