From 97bf9ce8fd2dc621ad49212d67694e5856cef8db Mon Sep 17 00:00:00 2001 From: S1m Date: Tue, 4 Jun 2024 11:36:12 +0200 Subject: [PATCH] Avoid processing many times the same image Cache img key during processing to avoid having to process it thousands of times --- src/js/easymde.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/easymde.js b/src/js/easymde.js index de0d9750..719ce1ca 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -2267,6 +2267,7 @@ EasyMDE.prototype.render = function (el) { } if (!window.EMDEimagesCache[keySrc]) { + window.EMDEimagesCache[keySrc] = {}; var img = document.createElement('img'); img.onload = function () { window.EMDEimagesCache[keySrc] = {