Skip to content

Commit

Permalink
fix(ivy): support view references in insertBefore (#2258)
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni committed Sep 21, 2020
1 parent 623d2f7 commit c2eaef5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nativescript-angular/renderer.ts
Expand Up @@ -31,7 +31,8 @@ export class NativeScriptRenderer extends Renderer2 {
}

@profile
insertBefore(parent: NgView, newChild: NgView, { previous, next }: ElementReference): void {
insertBefore(parent: NgView, newChild: NgView, refChild: NgView | ElementReference): void {
let { previous, next } = refChild instanceof View ? this.nextSibling(refChild) : refChild;
if (NativeScriptDebug.isLogEnabled()) {
NativeScriptDebug.rendererLog(`NativeScriptRenderer.insertBefore child: ${newChild} ` + `parent: ${parent} previous: ${previous} next: ${next}`);
}
Expand Down

0 comments on commit c2eaef5

Please sign in to comment.