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

Autofix of block-indentation crash #2998

Open
VincentMolinie opened this issue Nov 28, 2023 · 0 comments
Open

Autofix of block-indentation crash #2998

VincentMolinie opened this issue Nov 28, 2023 · 0 comments
Labels

Comments

@VincentMolinie
Copy link
Contributor

The autofix is crashing on one of my template:

<div class="c-projects">
  <div class="c-projects__action-buttons">
    <BetaSearchBar
      @searchFunction={{this.submitSearch}}
      @placeholder="Search project..."
      @class="c-projects__search-bar"
      @searchOnInput={{true}}
    />
    {{#if @canCreateProject}}
      <Navigation::BetaLinkTo
        @type="primary"
        @size="large"
        @text="New Project"
        @routeName="create-project"
        @displayAsButton={{true}}
        @queryParams={{this.createProjectHash}}
        class="c-projects--add"
        data-test-link="createProject"
      />
    {{/if}}
  </div>

  <div class="c-projects__list" data-test-projects>
    {{#each this.filteredProjects as |project|}}
      <ProjectCard @project={{project}} />
    {{else if this.search}}
      <Layout::LayoutProjectEmpty @searchValue={{this.search}} />
    {{else}}
      <div class="c-projects__empty">
        Your organization doesn’t have any projects yet.
      </div>
      {{#if @canCreateProject}}
        <div class="c-projects__empty">
          <Navigation::BetaLinkTo
            @type="primary"
            @text="Create a project"
            @routeName="create-project"
            @queryParams={{this.createProjectHash}}
            class="c-projects__empty-link"
            data-test-link="createProject"
          />
          or transfer an existing one from projects settings.
        </div>
      {{/if}}
    {{/each}}
  </div>
</div>

It throws on the function get trying to access body of undefined.
While investigating, I saw that the path isn't right 🤔. We are giving the following path [ 'children', 1, 'inverse', 'body', 1 ] from the top node but this isn't right it should be [ 'children', 1, 'children', 1, 'inverse', 'body', 1 ]

@bmish bmish added the bug label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants