ember-template-lint/ember-cli-template-lint

Cannot read property 'original' of undefined undefined

cah-danmonroe opened this issue · 4 comments

When using an unless block with else and there is no empty line between the else and the next child-block, you get Cannot read property 'original' of undefined undefined. Swapping the logic and using if blocks works fine.

{{#unless showStuff}}
  No Stuff
{{else}}
  {{#child-block}}
    Linting error: Cannot read property 'original' of undefined  undefined
  {{/child-block}}
{{/unless}}
{{#unless showStuff}}
  No Stuff
{{else}}

  {{#child-block}}
    Expected linting error: Using an else block with unless should be avoided.  simple-unless
  {{/child-block}}
{{/unless}}
{{#if showStuff}}
  {{#child-block}}
    Stuff
  {{/child-block}}
{{else}}
  This works as expected
{{/if}}

Thank you for reporting!

@rwjblue cannot reproduce this in masted due to
image

bmish commented

Thank you!