Skip to content

Commit e080bc4

Browse files
committed
Workaround for text node problem (needs to be fixed upstream)
1 parent dacf4a7 commit e080bc4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/angular-1.1.4.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -3293,7 +3293,9 @@ var $AnimatorProvider = function() {
32933293
var duration = 0;
32943294
//we want all the styles defined before and after
32953295
forEach(element, function(element) {
3296-
var globalStyles = $window.getComputedStyle(element) || {};
3296+
if (element.nodeType != 1 /* ELEMENT_NODE */) return;
3297+
var globalStyles = $window.getComputedStyle(element);
3298+
if (!globalStyles) return;
32973299
duration = Math.max(
32983300
parseFloat(globalStyles[w3cTransitionProp + durationKey]) ||
32993301
parseFloat(globalStyles[vendorTransitionProp + durationKey]) ||
@@ -16311,4 +16313,4 @@ var styleDirective = valueFn({
1631116313
});
1631216314

1631316315
})(window, document);
16314-
angular.element(document).find('head').append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
16316+
angular.element(document).find('head').append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');

src/viewDirective.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function $ViewDirective( $state, $compile, $controller, $animator, $an
3636
viewLocals = locals;
3737
view.state = locals.$$state;
3838

39-
animate.enter(angular.element('<div></div>').html(locals.$template).children(), element);
39+
animate.enter(angular.element('<div></div>').html(locals.$template).contents(), element);
4040
var link = $compile(element.contents());
4141
viewScope = scope.$new();
4242
if (locals.$$controller) {

0 commit comments

Comments
 (0)