Skip to content

Commit ba077aa

Browse files
test(uiView): Fix failing tests in ng 1.0.8 due to missing JQLite .empty() fn
1 parent 5be98e0 commit ba077aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/viewDirective.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,12 @@ function $ViewDirectiveFill ( $compile, $controller, $state, $interpolate
307307
priority: -400,
308308
compile: function (tElement) {
309309
var initial = tElement.html();
310-
tElement.empty();
310+
if (tElement.empty) {
311+
tElement.empty();
312+
} else {
313+
// ng 1.0.0 doesn't have empty(), which cleans up data and handlers
314+
tElement[0].innerHTML = null;
315+
}
311316

312317
return function (scope, $element, attrs) {
313318
var current = $state.$current,

0 commit comments

Comments
 (0)