FIX: browser infinite recursion when editing post

This was a result of:

c4ed353fae

jQuery map on a jQuery object, returns a jQuery object http://api.jquery.com/map/

So you need to convert it to an array prior to mapping
This commit is contained in:
Sam 2018-11-21 12:51:14 +11:00
parent 20268385a5
commit 0a86ef69bb

View File

@ -33,7 +33,7 @@ function _loadCachedShortUrls($images) {
}
function _loadShortUrls($images, ajax) {
const urls = $images.map(img => $(img).data("orig-src"));
const urls = $images.toArray().map(img => $(img).data("orig-src"));
lookupUncachedUploadUrls(urls, ajax).then(() =>
_loadCachedShortUrls($images)
);