last modified is flaky but. whatever
This commit is contained in:
		
							parent
							
								
									6a9ae7237d
								
							
						
					
					
						commit
						e56feaf1d0
					
				| @ -3,11 +3,13 @@ import { statSync } from "fs"; | |||||||
| export function modifiedTime() { | export function modifiedTime() { | ||||||
|   return function (_tree, file) { |   return function (_tree, file) { | ||||||
|     const path = file.history[0]; |     const path = file.history[0]; | ||||||
|     try { |  | ||||||
|     const result = statSync(path); |     const result = statSync(path); | ||||||
|     file.data.astro.frontmatter.lastModified = result.mtime; |     file.data.astro.frontmatter.lastModified = result.mtime; | ||||||
|     } catch (error) { |     // try {
 | ||||||
|       return; |     //   const result = statSync(path);
 | ||||||
|     }     |     //   file.data.astro.frontmatter.lastModified = result.mtime;
 | ||||||
|  |     // } catch (error) {
 | ||||||
|  |     //   return;
 | ||||||
|  |     // }
 | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user