File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22* DynamicForms - Build Forms in AngularJS From Nothing But JSON
3- * @version v0.0.0 - 2013-09-24
3+ * @version v0.0.1 - 2014-03-13
44* @link http://bitbucket.org/danhunsaker/angular-dynamic-forms
55* @license LGPLv3+, http://www.gnu.org/licenses/lgpl-3.0.en.html
66*/
@@ -134,7 +134,7 @@ angular.module('dynform', [])
134134 else if ( field . type === 'checklist' ) {
135135 if ( angular . isDefined ( field . val ) ) { model [ field . model ] = angular . copy ( field . val ) ; }
136136 if ( angular . isDefined ( field . options ) ) {
137- model [ field . model ] = { } ;
137+ if ( ! ( angular . isDefined ( model [ field . model ] ) && angular . isObject ( model [ field . model ] ) ) ) { model [ field . model ] = { } ; }
138138 angular . forEach ( field . options , function ( option , childId ) {
139139 newChild = angular . element ( '<input type="checkbox" />' ) ;
140140 newChild . attr ( 'name' , field . model + '.' + childId ) ;
@@ -469,4 +469,4 @@ angular.module('dynform', [])
469469 } ;
470470 } ] ) ;
471471
472- /* End of dynamic-forms.js */
472+ /* End of dynamic-forms.js */
You can’t perform that action at this time.
0 commit comments