Skip to content

Commit 536576b

Browse files
author
Steve Berube
committed
port condition loop from development branch for IE fix
1 parent 4c26383 commit 536576b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/services/builder.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ angular.module('schemaForm').provider('sfBuilder', ['sfPathProvider', function(s
128128
var children = args.fieldFrag.children || args.fieldFrag.childNodes;
129129
for (var i = 0; i < children.length; i++) {
130130
var child = children[i];
131-
var ngIf = child.getAttribute('ng-if');
132-
child.setAttribute(
133-
'ng-if',
134-
ngIf ?
135-
'(' + ngIf +
136-
') || (' + evalExpr + ')'
137-
: evalExpr
138-
);
131+
132+
if (child.hasAttribute && child.hasAttribute('ng-if')) {
133+
ngIf = child.getAttribute('ng-if');
134+
};
135+
136+
if (child.setAttribute) {
137+
child.setAttribute('ng-if', ngIf ? '(' + ngIf + ') || (' + evalExpr + ')' : evalExpr);
138+
};
139139
}
140140
}
141141
},

0 commit comments

Comments
 (0)