Skip to content

Commit 97bf9ce

Browse files
committed
Avoid processing many times the same image
Cache img key during processing to avoid having to process it thousands of times
1 parent f039bae commit 97bf9ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/js/easymde.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,6 +2267,7 @@ EasyMDE.prototype.render = function (el) {
22672267
}
22682268

22692269
if (!window.EMDEimagesCache[keySrc]) {
2270+
window.EMDEimagesCache[keySrc] = {};
22702271
var img = document.createElement('img');
22712272
img.onload = function () {
22722273
window.EMDEimagesCache[keySrc] = {

0 commit comments

Comments
 (0)