File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ var Speck = function () {
7070
7171 newData [ field ] = ( 0 , _lodash . isNil ) ( data [ field ] ) ? this . schema [ field ] . defaultValue : data [ field ] ;
7272
73- if ( this . schema [ field ] . type ) {
73+ if ( this . schema [ field ] . type || this . schema [ field ] . builder ) {
7474 newData [ field ] = this . applyEntityConstructor ( this . schema [ field ] , newData [ field ] ) ;
7575 }
7676
@@ -141,7 +141,7 @@ var Speck = function () {
141141 value : function applyEntityConstructor ( field , data ) {
142142 var Type = field . type ;
143143
144- if ( field . builder ) {
144+ if ( ( 0 , _lodash . isFunction ) ( field . builder ) ) {
145145 return field . builder ( data , Type ) ;
146146 }
147147
Original file line number Diff line number Diff line change 11{
22 "name" : " speck-entity" ,
3- "version" : " 0.1.5 " ,
3+ "version" : " 0.1.6 " ,
44 "description" : " Domain entities with reactive validation" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments