I am using ng2-dragula and with data binding in 2 tables. When a td is drag and drop to another table, it throws the Uncaught TypeError: Cannot read property 'splice' of undefined. and is not able to drop the element. Need help on how to resolve this problem.
Below is the html part
<table class="table">
<thead class="text-primary">
<tr>
<th>Task ID</th>
<th>Ref #</th>
<th>Customer Name</th>
<th>Doc Type</th>
<th>Date</th>
</tr>
</thead>
<tbody [dragula]='"team-bag"' [dragulaModel]="tasks">
<tr *ngFor="let t of tasks">
<td>{{t.id}}</td>
<td>{{t.refNbr}}</td>
<td>{{t.custName}}</td>
<td>{{t.docType}}</td>
<td>{{t.receiveDate}}</td>
</tr>
</tbody>
</table>
<table class="table">
<thead class="text-primary">
<tr>
<th>Task ID</th>
<th>Ref #</th>
<th>Customer Name</th>
<th>Doc Type</th>
<th>Date</th>
</tr>
</thead>
<tbody [dragula]='"team-bag"' [dragulaModel]="agentATasks">
<tr *ngFor="let t of agentATasks">
<td>{{t.id}}</td>
<td>{{t.refNbr}}</td>
<td>{{t.custName}}</td>
<td>{{t.docType}}</td>
<td>{{t.receiveDate}}</td>
</tr>
</tbody>
</table>
tasks and agentATasks are both defined and populated in the component.ts.
Below is the error in Chrome console. Subscriber.ts:241 Uncaught TypeError: Cannot read property 'splice' of undefined at Object.eval (http://localhost:3002/node_modules/ng2-dragula/components/dragula.provider.js:94:28) at emitter (http://localhost:3002/node_modules/contra/emitter.js:47:72) at Array.forEach (native) at Object.eval (http://localhost:3002/node_modules/contra/emitter.js:46:10) at Object.thing.emit (http://localhost:3002/node_modules/contra/emitter.js:38:48) at drop (http://localhost:3002/node_modules/dragula/dragula.js:261:13) at HTMLHtmlElement.release (http://localhost:3002/node_modules/dragula/dragula.js:245:7) at ZoneDelegate.invokeTask (http://localhost:3002/node_modules/zone.js/dist/zone.js:265:35) at Object.onInvokeTask (http://localhost:3002/node_modules/@angular/core/bundles/core.umd.js:5967:41) at ZoneDelegate.invokeTask (http://localhost:3002/node_modules/zone.js/dist/zone.js:264:40)