Permalink
Browse files

fix(attribute): check parent node on remove

before removing the child element inside the text attribute handling, make sure its actually the child of the target node

fixes issue #230
  • Loading branch information...
zewa666 committed Jul 20, 2017
1 parent af40374 commit 375a745ca1f6eabfc2616e4d75294da3722eed59
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/i18n.js
View
@@ -206,7 +206,7 @@ If you'd like Aurelia I18N to translate your bindable instead, please consider g
switch (attr) {
case 'text':
let newChild = DOM.createTextNode(this.tr(key, params));
if (node._newChild) {
if (node._newChild && node._newChild.parentNode === node) {
node.removeChild(node._newChild);
}

0 comments on commit 375a745

Please sign in to comment.