mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	fix(server): import issue for share template
This commit is contained in:
		
							parent
							
								
									de83029c3a
								
							
						
					
					
						commit
						0a56587c75
					
				| @ -195,9 +195,11 @@ function register(router: Router) { | |||||||
|                 try { |                 try { | ||||||
|                     const content = templateNote.getContent(); |                     const content = templateNote.getContent(); | ||||||
|                     if (typeof content === "string") { |                     if (typeof content === "string") { | ||||||
|  |                         import("ejs").then((ejs) => { | ||||||
|                             const ejsResult = ejs.render(content, opts, { includer }); |                             const ejsResult = ejs.render(content, opts, { includer }); | ||||||
|                             res.send(ejsResult); |                             res.send(ejsResult); | ||||||
|                             useDefaultView = false; // Rendering went okay, don't use default view
 |                             useDefaultView = false; // Rendering went okay, don't use default view
 | ||||||
|  |                         }); | ||||||
|                     } |                     } | ||||||
|                 } catch (e: unknown) { |                 } catch (e: unknown) { | ||||||
|                     const [errMessage, errStack] = safeExtractMessageAndStackFromError(e); |                     const [errMessage, errStack] = safeExtractMessageAndStackFromError(e); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran