Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make crossfade fallback param optional #6201

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

macmillen
Copy link
Contributor

It would be nice to mark the fallback param of the crossfade function from "svelte/transition" as optional to avoid passing an empty function when no fallback is desired.

before:

  const [send, receive] = crossfade({
    duration: 600,
    fallback: () => ({}),
  });

after:

  const [send, receive] = crossfade({ duration: 600 });

Notes

I think this was also intended by the author because there is already a null check for fallback.
return fallback && fallback(node, params, intro);

@Conduitry Conduitry merged commit ff23c45 into sveltejs:master Apr 30, 2021
@Conduitry
Copy link
Member

This type fix has been included in 3.38.0 - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants