mirror of
				https://github.com/jackyzha0/quartz.git
				synced 2025-10-31 06:57:40 +01:00 
			
		
		
		
	fix: treat the 0 time as invalid too
This commit is contained in:
		
							parent
							
								
									ea5742c328
								
							
						
					
					
						commit
						697bffdb8b
					
				| @ -14,7 +14,7 @@ const defaultOptions: Options = { | |||||||
| 
 | 
 | ||||||
| function coerceDate(fp: string, d: any): Date { | function coerceDate(fp: string, d: any): Date { | ||||||
|   const dt = new Date(d) |   const dt = new Date(d) | ||||||
|   const invalidDate = isNaN(dt.getTime()) |   const invalidDate = isNaN(dt.getTime()) || dt.getTime() === 0 | ||||||
|   if (invalidDate && d !== undefined) { |   if (invalidDate && d !== undefined) { | ||||||
|     console.log( |     console.log( | ||||||
|       chalk.yellow( |       chalk.yellow( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jacky Zhao
						Jacky Zhao