@@ -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 ;
@@ -1024,8 +1024,8 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
10241024 var len = list . length ;
10251025 var copy = scope . copyWithIndex ( len ) ;
10261026 schemaForm . traverseForm ( copy , function ( part ) {
1027- if ( part . key && angular . isDefined ( part . default ) ) {
1028- sfSelect ( part . key , scope . model , part . default ) ;
1027+ if ( part . key && angular . isDefined ( part [ ' default' ] ) ) {
1028+ sfSelect ( part . key , scope . model , part [ ' default' ] ) ;
10291029 }
10301030 } ) ;
10311031
0 commit comments