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 having `slot` attribute on `<slot>` #566

Closed
niclassahlin opened this Issue Oct 4, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@niclassahlin

niclassahlin commented Oct 4, 2017

I'm submitting a bug report

  • Library Version:
    aurelia-templating 1.5.0

Please tell us about your environment:

  • Operating System:
    OSX 10.12.6

  • Node Version:
    7.10.1

  • NPM Version:
    4.2.0
  • Browser:
    Chrome 63.0.3232.0

  • Language:
    TypeScript 2.5

Current behavior:
Error TypeError: Cannot read property 'isInitialized' of undefined when projecting a slot into another slot, i.e.

<mixed-slot>
    <slot name="slot1" slot="slot1">Fallback Content for Projected Slot 1</slot>
    <slot name="slot2" slot="fallbackSlot2">Fallback Content for Projected Slot 2</slot>
</mixed-slot>

Reproduced in niclassahlin/aurelia-templating-bug.

@StrahilKazlachev

This comment has been minimized.

Show comment
Hide comment
@StrahilKazlachev

StrahilKazlachev Oct 7, 2017

Contributor

@EisenbergEffect The issue is caused from 2 things as far as I can tell, don't know which is the problem.

  1. The refactoring of the BindableProperty.prototype._configureDescriptor in Inherit Bindable Properties - the behavior is no longer passed in, but acquired using metadata.get.
  2. SlotCustomAttribute has no HtmlBehavior associated with it - don't know whether this is a bug that's been unnoticed till know because of how BindableProperty.prototype._configureDescriptor was implemented or it is by design.

Decorating SlotCustomAttribute with @customAttribute() does seem to solve the issue, but if that is a fix depends on whether 2. is by design or not.

Contributor

StrahilKazlachev commented Oct 7, 2017

@EisenbergEffect The issue is caused from 2 things as far as I can tell, don't know which is the problem.

  1. The refactoring of the BindableProperty.prototype._configureDescriptor in Inherit Bindable Properties - the behavior is no longer passed in, but acquired using metadata.get.
  2. SlotCustomAttribute has no HtmlBehavior associated with it - don't know whether this is a bug that's been unnoticed till know because of how BindableProperty.prototype._configureDescriptor was implemented or it is by design.

Decorating SlotCustomAttribute with @customAttribute() does seem to solve the issue, but if that is a fix depends on whether 2. is by design or not.

@EisenbergEffect

This comment has been minimized.

Show comment
Hide comment
@EisenbergEffect

EisenbergEffect Oct 7, 2017

Member

@StrahilKazlachev I think the missing behavior may have been an unnoticed bug. Do you have time to add that and perform a few tests to ensure that everything is working as expected?

Member

EisenbergEffect commented Oct 7, 2017

@StrahilKazlachev I think the missing behavior may have been an unnoticed bug. Do you have time to add that and perform a few tests to ensure that everything is working as expected?

@StrahilKazlachev

This comment has been minimized.

Show comment
Hide comment
@StrahilKazlachev

StrahilKazlachev Oct 7, 2017

Contributor

@EisenbergEffect Yes, I'll see what I can do.

Contributor

StrahilKazlachev commented Oct 7, 2017

@EisenbergEffect Yes, I'll see what I can do.

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