mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	chore(share): fix @typescript-eslint/no-unused-vars for unused note variable
there's no need to assign a variable, if we never use the value outside of the if check
This commit is contained in:
		
							parent
							
								
									c2b75a6421
								
							
						
					
					
						commit
						cd9d90323c
					
				| @ -344,7 +344,6 @@ function register(router: Router) { | |||||||
|         shacaLoader.ensureLoad(); |         shacaLoader.ensureLoad(); | ||||||
| 
 | 
 | ||||||
|         const ancestorNoteId = req.query.ancestorNoteId ?? "_share"; |         const ancestorNoteId = req.query.ancestorNoteId ?? "_share"; | ||||||
|         let note; |  | ||||||
| 
 | 
 | ||||||
|         if (typeof ancestorNoteId !== "string") { |         if (typeof ancestorNoteId !== "string") { | ||||||
|             res.status(400).json({ message: "'ancestorNoteId' parameter is mandatory." }); |             res.status(400).json({ message: "'ancestorNoteId' parameter is mandatory." }); | ||||||
| @ -352,7 +351,7 @@ function register(router: Router) { | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // This will automatically return if no ancestorNoteId is provided and there is no shareIndex
 |         // This will automatically return if no ancestorNoteId is provided and there is no shareIndex
 | ||||||
|         if (!(note = checkNoteAccess(ancestorNoteId, req, res))) { |         if (!checkNoteAccess(ancestorNoteId, req, res)) { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Panagiotis Papadopoulos
						Panagiotis Papadopoulos