Skip to content

A platform for community discussion. Free, open, simple.

PERF: Pass element to resolveAllShortUrl function, not text selector (#9988)

David Taylorbe5974734dab
diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.js b/app/assets/javascripts/discourse/app/components/composer-editor.js
index 74443c88ec4..e33973cd44c 100644
--- a/app/assets/javascripts/discourse/app/components/composer-editor.js
+++ b/app/assets/javascripts/discourse/app/components/composer-editor.js
@@ -1000,7 +1000,7 @@ export default Component.extend({
);
// Short upload urls need resolution
- resolveAllShortUrls(ajax, this.siteSettings, ".d-editor-preview-wrapper");
+ resolveAllShortUrls(ajax, this.siteSettings, $preview[0]);
if (this._enableAdvancedEditorPreviewSync()) {
this._syncScroll(