forked from EVOgeek/Vmeda.Online
		
	MOBILE-3201 libs: Fix sortProperties null object error
This commit is contained in:
		
							parent
							
								
									c94c319225
								
							
						
					
					
						commit
						b4f563282b
					
				| @ -1252,7 +1252,7 @@ export class CoreUtilsProvider { | |||||||
|      * @return Sorted object. |      * @return Sorted object. | ||||||
|      */ |      */ | ||||||
|     sortProperties(obj: object): object { |     sortProperties(obj: object): object { | ||||||
|         if (typeof obj == 'object' && !Array.isArray(obj)) { |         if (obj != null && typeof obj == 'object' && !Array.isArray(obj)) { | ||||||
|             // It's an object, sort it.
 |             // It's an object, sort it.
 | ||||||
|             return Object.keys(obj).sort().reduce((accumulator, key) => { |             return Object.keys(obj).sort().reduce((accumulator, key) => { | ||||||
|                 // Always call sort with the value. If it isn't an object, the original value will be returned.
 |                 // Always call sort with the value. If it isn't an object, the original value will be returned.
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user