File tree 2 files changed +1
-5
lines changed
2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ describe('Template', () => {
110
110
expect ( out ) . toEqual ( < div dangerouslySetInnerHTML = { { __html : 'it supports transformData' } } > </ div > ) ;
111
111
} ) ;
112
112
113
- it ( 'throws an error if the transformData is not anything' , ( ) => {
113
+ it ( 'throws an error if the transformData is not returning anything' , ( ) => {
114
114
templates = { test : 'it supports {{feature}}' } ;
115
115
data = { feature : 'replace me' } ;
116
116
templateKey = 'test' ;
Original file line number Diff line number Diff line change @@ -106,11 +106,7 @@ function prepareToggleData(transformData) {
106
106
107
107
if ( transformData ) {
108
108
newData = transformData ( newData ) ;
109
- if ( typeof newData !== 'object' ) {
110
- throw new Error ( '`transformData` must return an object.' ) ;
111
- }
112
109
}
113
-
114
110
return newData ;
115
111
} ;
116
112
}
You can’t perform that action at this time.
0 commit comments