mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
parent
20268385a5
commit
0a86ef69bb
@ -33,7 +33,7 @@ function _loadCachedShortUrls($images) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _loadShortUrls($images, ajax) {
|
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(() =>
|
lookupUncachedUploadUrls(urls, ajax).then(() =>
|
||||||
_loadCachedShortUrls($images)
|
_loadCachedShortUrls($images)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user