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

Error when getting a message that has only attributes #695

Closed
macabeus opened this issue Feb 21, 2023 · 1 comment · Fixed by #689
Closed

Error when getting a message that has only attributes #695

macabeus opened this issue Feb 21, 2023 · 1 comment · Fixed by #689
Assignees
Labels
bug Something isn't working

Comments

@macabeus
Copy link

We may need a message with only attributes, then our Svelte code will be something like:

<Localized id="foo" let:attrs>
 <p>{attrs.paragraph1}</p>
</Localized>

But it crashes when loading a message like this one:

foo =
  .bar = example

while it works in this case:

foo = fix
  .bar = example

Error log:

TypeError: Invalid value used in weak set
    at WeakSet.add (<anonymous>)
    at resolveComplexPattern (resolver.js:232:17)
    at FluentBundle.formatPattern (bundle.js:150:25)
    at FluentProvider.svelte:27:25
    at $$self.$$.update (Localized.svelte:7:19)
    at init (index.mjs:2027:8)
    at new Localized (Localized.svelte:7:43)
    at Array.create_default_slot (RowWhatIsGambiConf.svelte:37:28)
    at create_slot (index.mjs:71:28)
    at create_fragment (Window.svelte:46:23)
@sfriedel
Copy link
Collaborator

@macabeus thanks for reporting. This should be fixed in the next release.

@sfriedel sfriedel self-assigned this Feb 22, 2023
@sfriedel sfriedel added the bug Something isn't working label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants