From 5a62f0247c46d135e142df834445151bc7d03dba Mon Sep 17 00:00:00 2001 From: smnbbrv Date: Fri, 7 Jun 2019 18:30:46 +0200 Subject: [PATCH] fix: not being able to create sortable, fix #162 --- projects/ngx-sortablejs/src/lib/sortablejs.directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngx-sortablejs/src/lib/sortablejs.directive.ts b/projects/ngx-sortablejs/src/lib/sortablejs.directive.ts index 9c5fbb4..238d207 100644 --- a/projects/ngx-sortablejs/src/lib/sortablejs.directive.ts +++ b/projects/ngx-sortablejs/src/lib/sortablejs.directive.ts @@ -72,7 +72,7 @@ export class SortablejsDirective implements OnInit, OnChanges, OnDestroy { } private create() { - const container = this.sortablejsContainer ? this.element.nativeElement : this.element.nativeElement.querySelector(this.sortablejsContainer); + const container = this.sortablejsContainer ? this.element.nativeElement.querySelector(this.sortablejsContainer) : this.element.nativeElement; setTimeout(() => { this.sortableInstance = Sortable.create(container, this.options);