mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix trailing slash in shared note in IE, closes #3782
This commit is contained in:
		
							parent
							
								
									ed52919f9e
								
							
						
					
					
						commit
						e70cca4736
					
				@ -39,7 +39,14 @@ export default class SharedInfoWidget extends NoteContextAwareWidget {
 | 
				
			|||||||
            this.$sharedText.text("This note is shared publicly on");
 | 
					            this.$sharedText.text("This note is shared publicly on");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            link = `${location.protocol}//${location.host}${location.pathname}share/${shareId}`;
 | 
					            let host = location.host;
 | 
				
			||||||
 | 
					            if (host.endsWith('/')) {
 | 
				
			||||||
 | 
					                // seems like IE has trailing slash
 | 
				
			||||||
 | 
					                // https://github.com/zadam/trilium/issues/3782
 | 
				
			||||||
 | 
					                host = host.substr(0, host.length - 1);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            link = `${location.protocol}//${host}${location.pathname}share/${shareId}`;
 | 
				
			||||||
            this.$sharedText.text("This note is shared locally on");
 | 
					            this.$sharedText.text("This note is shared locally on");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user