Skip to content

Commit 285b017

Browse files
author
rhorenov
committed
Fix for l-lin#1160: Cannot reinitialise DataTable.
1 parent 9197797 commit 285b017

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/angular-datatables.renderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererServic
227227
function _destroyAndCompile() {
228228
if (_newParentScope) {
229229
_newParentScope.$destroy();
230+
} else {
231+
_oTable.ngDestroy();
230232
}
231-
_oTable.ngDestroy();
232233
// Re-compile because we lost the angular binding to the existing data
233234
_$elem.html(_staticHTML);
234235
_newParentScope = _parentScope.$new();

0 commit comments

Comments
 (0)