Update Python value of null/undefined/empty.
This commit is contained in:
		
							parent
							
								
									e0a28b434e
								
							
						
					
					
						commit
						254eb3beda
					
				
							
								
								
									
										4
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								index.js
									
									
									
									
									
								
							| @ -73,7 +73,7 @@ function parsePythonConf(str, cb) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function toPyVal(val) { | function toPyVal(val) { | ||||||
|   if (null === val) { |   if (null === val || '' === val) { | ||||||
|     return 'None'; |     return 'None'; | ||||||
|   } |   } | ||||||
|   else if (true === val) { |   else if (true === val) { | ||||||
| @ -119,7 +119,7 @@ function stringifyPythonConf(obj, cb) { | |||||||
| 
 | 
 | ||||||
|     if ('undefined' === typeof pyval) { |     if ('undefined' === typeof pyval) { | ||||||
|       if ('number' === typeof num) { |       if ('number' === typeof num) { | ||||||
|         pyval = ''; |         pyval = 'None'; | ||||||
|       } else { |       } else { | ||||||
|         return; |         return; | ||||||
|       } |       } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user