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

Don't infinitely duplicate positional arguments when modifiers update #1565

Merged

Conversation

@NullVoxPopuli
Copy link
Contributor Author

Atm, this test is failing:

  @test
  'Can pass curried modifier as argument and invoke dynamically (with named args, multi-layer)'() {
    const foo = defineSimpleModifier(
      (element: Element, _: unknown, { greeting, name }: { greeting: string; name: string }) =>
        (element.innerHTML = `${greeting} ${name}`)
    );

    this.registerComponent('TemplateOnly', 'Foo', '<div {{@value name="Nebula!"}}></div>');
    this.registerComponent(
      'TemplateOnly',
      'Bar',
      '<Foo @value={{modifier @value greeting="Hello," name="world!"}}/>'
    );

    this.render('<Bar @value={{modifier this.foo greeting="Hola,"}}/>', { foo });
    this.assertHTML('<div>Hello, Nebula!</div>');
    this.assertStableRerender();
  }

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

Successfully merging this pull request may close these issues.

2 participants