Skip to content

<i18n-t> crashes when using some combination of slots #2189

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

Closed
4 tasks done
davidwessman opened this issue May 23, 2025 · 1 comment
Closed
4 tasks done

<i18n-t> crashes when using some combination of slots #2189

davidwessman opened this issue May 23, 2025 · 1 comment
Labels
❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf

Comments

@davidwessman
Copy link

Reporting a bug?

    <i18n-t tag="div" keypath="with_double_slot">
      <template #a>
        <h1>a</h1>
      </template>

      <template #blaha>
        <h1>b</h1>
      </template>

      <template> test </template>
    </i18n-t>

crashes with

.localservice@runtime.55edb8f4.js:26 TypeError: slot is not a function
    at vue-i18n.js?v=664abfb0:4857:20
    at Array.reduce (<anonymous>)
    at getInterpolateArg (vue-i18n.js?v=664abfb0:4854:17)
    at Proxy.<anonymous> (vue-i18n.js?v=664abfb0:4896:19)
    at renderComponentRoot (chunk-GNBNPM2D.js?v=0636b056:8679:17)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-GNBNPM2D.js?v=0636b056:7550:26)
    at ReactiveEffect.run (chunk-GNBNPM2D.js?v=0636b056:494:19)
    at updateComponent (chunk-GNBNPM2D.js?v=0636b056:7411:18)
    at processComponent (chunk-GNBNPM2D.js?v=0636b056:7345:7)
    at patch (chunk-GNBNPM2D.js?v=0636b056:6849:11)
console.<computed> @ [email protected]:26
(anonymous) @ chunk-GNBNPM2D.js?v=0636b056:2653
(anonymous) @ App.vue?t=1748009367613:157
(anonymous) @ client.ts:559
(anonymous) @ client.ts:476
(anonymous) @ client.ts:323
queueUpdate @ client.ts:323
await in queueUpdate
(anonymous) @ client.ts:176
handleMessage @ client.ts:174
(anonymous) @ client.ts:91
dispatchEvent @ [email protected]:26
_handleMessage @ [email protected]:26
_0x51e611 @ [email protected]:26
App.vue?t=1748009367613:157 [HMR] Something went wrong during Vue component hot-reload. Full reload required.
(anonymous) @ chunk-GNBNPM2D.js?v=0636b056:2654
(anonymous) @ App.vue?t=1748009367613:157
(anonymous) @ client.ts:559
(anonymous) @ client.ts:476
(anonymous) @ client.ts:323
queueUpdate @ client.ts:323
await in queueUpdate
(anonymous) @ client.ts:176
handleMessage @ client.ts:174
(anonymous) @ client.ts:91
dispatchEvent @ [email protected]:26
_handleMessage @ [email protected]:26
_0x51e611 @ [email protected]:26

Expected behavior

It should not crash

Reproduction

https://stackblitz.com/edit/vitejs-vite-2iqhu9uf?file=src%2FApp.vue,src%2Fmain.ts,package.json,package-lock.json

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: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^4.2.3 => 4.3.4 
    vite: ^4.4.9 => 4.4.9 
    vue: 3.5.14 => 3.5.14 
    vue-i18n: 11.1.3 => 11.1.3 
    vue-tsc: ^1.8.8 => 1.8.10

Screenshot

Image

Additional context

Probably related to #2167 but I have not managed to fix it.
This change in Vue has been merged and released:
vuejs/core#13215

Validations

@davidwessman davidwessman added the Status: Review Needed Request for review comments label May 23, 2025
@kazupon kazupon added ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf and removed Status: Review Needed Request for review comments labels May 24, 2025
@kazupon
Copy link
Member

kazupon commented May 24, 2025

Hi!
I've just released v11.1.4!
Please check it !

Thanks!

@kazupon kazupon closed this as completed May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf
Projects
None yet
Development

No branches or pull requests

2 participants