Skip to content

[BUG] animateSequence does not support null/undefined #3390

@bakura10

Description

@bakura10

Hello,

I'm still trying to upgrading from Motion 10 to Motion 11, by using the Motion Mini. We've found another different behavior difference.

In Motion 10 the sequence was permissive and allowed null/undefined elements in the sequence, which was convenient as in our case, we don't have control on the content so we never know if a specific element will be here or not.

In Motion 11 though, it seems null are no longer support, so this:

return animateSequence([
      [this.dialogElement, { '--dialog-backdrop-opacity': [0, 0.4], opacity: [null, 1] }, { duration: 0.4 }],
      [this.dialogElement.querySelector('.modal__header'), { opacity: [null, 1] }, { duration: 0.4 }],
    ])

Will trigger an error if the modal does not have a header.

Is this the intended result of Motion Mini animateSequence or is this a regression?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions