File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,13 +93,13 @@ export class ObjectSerializer {
9393 * Deserialize object from json string
9494 */
9595 public static deserialize ( data : any , type : string ) {
96- if ( data === undefined || data === null ) {
96+ if ( data === undefined || data === null )
9797 return data ;
98- // polymorphism may change the actual type.
9998 type = ObjectSerializer . findCorrectType ( data , type ) ;
100- } else if ( primitives . indexOf ( type . toLowerCase ( ) ) !== - 1 ) {
99+ // polymorphism may change the actual type.
100+ if ( primitives . indexOf ( type . toLowerCase ( ) ) !== - 1 )
101101 return data ;
102- } else if ( type . lastIndexOf ( "Array<" , 0 ) === 0 ) { // string.startsWith pre es6
102+ if ( type . lastIndexOf ( "Array<" , 0 ) === 0 ) { // string.startsWith pre es6
103103 let subType : string = type . replace ( "Array<" , "" ) ; // Array<Type> => Type>
104104 subType = subType . substring ( 0 , subType . length - 1 ) ; // Type> => Type
105105 const transformedData = [ ] ;
You can’t perform that action at this time.
0 commit comments