mirror of
https://github.com/zadam/trilium.git
synced 2024-09-23 00:56:00 +08:00
check for images happens before other methods in utils.isHtmlEmpty()
This commit is contained in:
parent
8eeb395523
commit
b10c083560
|
@ -262,9 +262,10 @@ function isHtmlEmpty(html) {
|
|||
|
||||
html = html.toLowerCase();
|
||||
|
||||
return $("<div>").html(html).text().trim().length === 0
|
||||
&& !html.includes('<img')
|
||||
&& !html.includes('<section');
|
||||
return !html.includes('<img')
|
||||
&& !html.includes('<section')
|
||||
// line below will actually attempt to load images so better to check for images first
|
||||
&& $("<div>").html(html).text().trim().length === 0;
|
||||
}
|
||||
|
||||
async function clearBrowserCache() {
|
||||
|
|
Loading…
Reference in a new issue