mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01: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();
|
html = html.toLowerCase();
|
||||||
|
|
||||||
return $("<div>").html(html).text().trim().length === 0
|
return !html.includes('<img')
|
||||||
&& !html.includes('<img')
|
&& !html.includes('<section')
|
||||||
&& !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() {
|
async function clearBrowserCache() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user