fix image being redownloaded from localhost

This commit is contained in:
zadam
2020-05-04 10:03:54 +02:00
parent 8b5536ee3a
commit b89a2df462
2 changed files with 11 additions and 2 deletions

View File

@@ -290,7 +290,7 @@ async function downloadImages(noteId, content) {
while (match = re.exec(origContent)) {
const url = match[1];
if (!url.startsWith('api/images/')
if (!url.includes('api/images/')
// this is and exception for the web clipper's "imageId"
&& (url.length !== 20 || url.toLowerCase().startsWith('http'))) {
if (url in downloadImagePromises) {