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

Replacing an html-safe empty string at the end of an each causes a rendering error #16314

Closed
mongoose700 opened this issue Mar 2, 2018 · 3 comments

Comments

@mongoose700
Copy link
Contributor

mongoose700 commented Mar 2, 2018

The error is triggered when it tries to replace the html-safe empty string in the each with anything. It also requires that within the each, the html-safe empty string is the last thing to be displayed.

The error triggered is

Uncaught TypeError: Cannot read property 'nextSibling' of null

in

DOMChanges.prototype.insertAfter = function insertAfter(element, node, reference) {
  this.insertBefore(element, node, reference.nextSibling);
};

It is reproduced here:
https://ember-twiddle.com/845f172f2878679fcba7fd6ec62ca48f

@Serabe
Copy link
Member

Serabe commented Mar 9, 2018

The problem is with the ~ in:

{{#each items as |item|}}
  {{item~}}
{{/each}}

@mongoose700
Copy link
Contributor Author

Yes, the error does not happen when the ~ is removed. That's why I specified "It also requires that within the each, the html-safe empty string is the last thing to be displayed."

chancancode added a commit to glimmerjs/glimmer-vm that referenced this issue Sep 24, 2018
Likely related:

emberjs/ember.js#14924
emberjs/ember.js#16172
emberjs/ember.js#16314

Closes #791

Co-authored-by: Michael Peirce <msp700@gmail.com>
chancancode added a commit that referenced this issue Sep 25, 2018
chancancode added a commit to glimmerjs/glimmer-vm that referenced this issue Sep 25, 2018
Likely related:

emberjs/ember.js#14924
emberjs/ember.js#16172
emberjs/ember.js#16314

Closes #791

Co-authored-by: Michael Peirce <msp700@gmail.com>
chancancode added a commit that referenced this issue Sep 25, 2018
chancancode added a commit that referenced this issue Sep 25, 2018
chancancode added a commit that referenced this issue Sep 25, 2018
chancancode added a commit that referenced this issue Sep 25, 2018
(cherry picked from commit 74ebe7b)
chancancode added a commit that referenced this issue Sep 25, 2018
Fixes #14978, #14924, #16172, #16314

(cherry picked from commit 283dcd1)
chancancode added a commit that referenced this issue Sep 25, 2018
(cherry picked from commit 74ebe7b)
chancancode added a commit that referenced this issue Sep 25, 2018
Fixes #14978, #14924, #16172, #16314

(cherry picked from commit 283dcd1)
@chancancode
Copy link
Member

Sorry it took so long, this is fixed in 3.4.3 (#17003)

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

No branches or pull requests

3 participants