File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ function ParseNumber(v: number | string, isInt = false): number {
15
15
return ( isInt ? parseInt ( v ) : parseFloat ( v ) ) || 0 ;
16
16
}
17
17
18
- function FromArray < T > ( Ctor : { new ( v : any ) : T } , data ?: any [ ] | any , def = null ) : T [ ] | null {
18
+ function FromArray < T > ( Ctor : { new ( v : any ) : T } , data ?: any [ ] | any , def = null ) : T [ ] | null {
19
19
if ( ! data || ! Object . keys ( data ) . length ) return def ;
20
20
const d = Array . isArray ( data ) ? data : [ data ] ;
21
21
return d . map ( ( v : any ) => new Ctor ( v ) ) ;
22
22
}
23
23
24
24
function ToObject ( o : any , typeOrCfg : any = { } , child = false ) : any {
25
- if ( ! o ) return null ;
25
+ if ( o == null ) return null ;
26
26
if ( typeof o . toObject === 'function' && child ) return o . toObject ( ) ;
27
27
28
28
switch ( typeof o ) {
You can’t perform that action at this time.
0 commit comments