Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0fae109

Browse files
committed
fix(compile): IE8 specific fix
Fix for [].splice on IE8 that has the second argument as mandatory Fix for arrays on IE8 that adds an extra element on trailing comma
1 parent 9692381 commit 0fae109

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/ng/compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ function $CompileProvider($provide) {
662662
compileNode = $compileNode[0];
663663
replaceWith(jqCollection, jqLite($template[0]), compileNode);
664664
cloneContent.append($template);
665-
forEach(nestedContent.splice(1),
665+
forEach(nestedContent.splice(1, nestedContent.length - 1),
666666
function(toRemove) {
667667
removeElement(jqCollection, toRemove);
668668
cloneContent.append(toRemove);

test/ng/compileSpec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ describe('$compile', function() {
405405
'<span>{{item.text}}></span>' +
406406
'<span>{{item.done}}</span>' +
407407
'</div>' +
408-
'<div ng-repeat-end></div>',
409-
408+
'<div ng-repeat-end></div>'
410409
], function(template) {
411410
expect(function() {
412411
$compile('<div>' + template + '</div>');

0 commit comments

Comments
 (0)