Skip to content

Commit 04b09b6

Browse files
author
Josh White
committed
Fix to IE8 Issues
1 parent 764599d commit 04b09b6

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

dist/schema-form.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ angular.module('schemaForm').provider('schemaForm',
508508

509509
//Non standard attributes
510510
if (schema.validationMessage) { f.validationMessage = schema.validationMessage; }
511-
if (schema.enumNames) { f.titleMap = canonicalTitleMap(schema.enumNames, schema.enum); }
511+
if (schema.enumNames) { f.titleMap = canonicalTitleMap(schema.enumNames, schema['enum']); }
512512
f.schema = schema;
513513

514514
// Ng model options doesn't play nice with undefined, might be defined
@@ -518,7 +518,7 @@ angular.module('schemaForm').provider('schemaForm',
518518
};
519519

520520
var text = function(name, schema, options) {
521-
if (schema.type === 'string' && !schema.enum) {
521+
if (schema.type === 'string' && !schema['enum']) {
522522
var f = stdFormObj(name, schema, options);
523523
f.key = options.path;
524524
f.type = 'text';
@@ -560,25 +560,25 @@ angular.module('schemaForm').provider('schemaForm',
560560
};
561561

562562
var select = function(name, schema, options) {
563-
if (schema.type === 'string' && schema.enum) {
563+
if (schema.type === 'string' && schema['enum']) {
564564
var f = stdFormObj(name, schema, options);
565565
f.key = options.path;
566566
f.type = 'select';
567567
if (!f.titleMap) {
568-
f.titleMap = enumToTitleMap(schema.enum);
568+
f.titleMap = enumToTitleMap(schema['enum']);
569569
}
570570
options.lookup[sfPathProvider.stringify(options.path)] = f;
571571
return f;
572572
}
573573
};
574574

575575
var checkboxes = function(name, schema, options) {
576-
if (schema.type === 'array' && schema.items && schema.items.enum) {
576+
if (schema.type === 'array' && schema.items && schema.items['enum']) {
577577
var f = stdFormObj(name, schema, options);
578578
f.key = options.path;
579579
f.type = 'checkboxes';
580580
if (!f.titleMap) {
581-
f.titleMap = enumToTitleMap(schema.items.enum);
581+
f.titleMap = enumToTitleMap(schema.items['enum']);
582582
}
583583
options.lookup[sfPathProvider.stringify(options.path)] = f;
584584
return f;
@@ -1007,8 +1007,8 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
10071007
var len = list.length;
10081008
var copy = scope.copyWithIndex(len);
10091009
schemaForm.traverseForm(copy, function(part) {
1010-
if (part.key && angular.isDefined(part.default)) {
1011-
sfSelect(part.key, scope.model, part.default);
1010+
if (part.key && angular.isDefined(part['default'])) {
1011+
sfSelect(part.key, scope.model, part['default']);
10121012
}
10131013
});
10141014

0 commit comments

Comments
 (0)