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

Commit 0882fe2

Browse files
Added fix for whitepsace in directive templates
1 parent 0784977 commit 0882fe2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/compile.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3679,8 +3679,9 @@ function removeComments(jqNodes) {
36793679

36803680
while (i--) {
36813681
var node = jqNodes[i];
3682-
if (node.nodeType === NODE_TYPE_COMMENT) {
3683-
splice.call(jqNodes, i, 1);
3682+
if (node.nodeType === NODE_TYPE_COMMENT ||
3683+
(node.nodeType === NODE_TYPE_TEXT && node.nodeValue.trim() === '' )) {
3684+
splice.call(jqNodes, i, 1);
36843685
}
36853686
}
36863687
return jqNodes;

0 commit comments

Comments
 (0)