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

We already have a reference to the preview element, so there is no need to look it up again. This saves about 1ms per keypress in my testing.
This commit is contained in:
David Taylor 2020-06-05 13:37:07 +01:00 committed by GitHub
parent 731263b81c
commit be5974734d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(