improve syntax formatting
This commit is contained in:
		
							parent
							
								
									9d5df38baa
								
							
						
					
					
						commit
						01b81d29e9
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -24,20 +24,20 @@ export default class net { | ||||||
| 			if (CONNECT.ok && !VERIFY_ONLY) { | 			if (CONNECT.ok && !VERIFY_ONLY) { | ||||||
| 				DATA = await CONNECT.text(); | 				DATA = await CONNECT.text(); | ||||||
| 			 | 			 | ||||||
| 				if ( | 				if (TYPE | ||||||
| 					TYPE | 						? (TYPE.toLowerCase().includes(`json`) || TYPE.toLowerCase().includes(`dictionary`)) | ||||||
| 						? TYPE.toLowerCase().includes(`json`) || TYPE.toLowerCase().includes(`dictionary`) | 						: false) { | ||||||
| 						: false |  | ||||||
| 				) { |  | ||||||
| 					try { | 					try { | ||||||
| 					DATA = JSON.parse(DATA); | 						DATA = JSON.parse(DATA); | ||||||
| 					// When not in JSON, run this.
 |  | ||||||
| 					} catch(err) { | 					} catch(err) { | ||||||
|  | 						// When not in JSON, run this.
 | ||||||
| 						if (STRICT) { | 						if (STRICT) { | ||||||
| 							// Should not allow the data to be returned since it's not correct. 
 | 							// Should not allow the data to be returned since it's not correct. 
 | ||||||
| 							DATA = null; | 							DATA = null; | ||||||
| 							throw new TypeError(texts.localized(`error_msg_notJSON`, false)); | 							throw new TypeError(texts.localized(`error_msg_notJSON`, false)); | ||||||
| 						} else {logging.warn(texts.localized(`error_msg_notJSON`, false));} | 						} else { | ||||||
|  | 							logging.warn(texts.localized(`error_msg_notJSON`, false)); | ||||||
|  | 						} | ||||||
| 					}; | 					}; | ||||||
| 				}; | 				}; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue