Skip to content

Error thrown when using custom defered transition as a bidirectional transition #8224

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

Open
oskar-koli opened this issue Jan 24, 2023 · 0 comments

Comments

@oskar-koli
Copy link

oskar-koli commented Jan 24, 2023

Describe the bug

Using a defered bidirectional transition throws an error:

Uncaught (in promise) TypeError: outros is undefined
    go chunk-K6MJRMI7.js?v=2acd031f:1227
    run chunk-K6MJRMI7.js?v=2acd031f:1278

It works fine if implemented as a non-defered transition.

The code from the repro case below:

<script lang="ts">
  function customTransition() {
    return () => {
      return {
        duration: 2000
      }
    }
  }
</script>

<button on:click transition:customTransition>
  <slot></slot>
</button>

Reproduction

Stackbliz example here.

To reproduce, click on the button and the error is thrown.

Logs

Uncaught (in promise) TypeError: outros is undefined
    go chunk-K6MJRMI7.js?v=2acd031f:1227
    run chunk-K6MJRMI7.js?v=2acd031f:1278
    promise chunk-K6MJRMI7.js?v=2acd031f:1276
    outro /src/lib/Counter.svelte:89
    transition_out chunk-K6MJRMI7.js?v=2acd031f:1073
    outro /src/App.svelte:68
    transition_out chunk-K6MJRMI7.js?v=2acd031f:1073
    update /src/App.svelte:327
    update chunk-K6MJRMI7.js?v=2acd031f:1021
    flush chunk-K6MJRMI7.js?v=2acd031f:987

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    svelte: ^3.55.1 => 3.55.1

Severity

annoyance

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

No branches or pull requests

2 participants