FIX: Composer service call breaking shared edits (#494)

This commit is contained in:
Keegan George 2024-02-27 15:13:46 -08:00 committed by GitHub
parent a1f1067f69
commit a1b607db80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,6 @@ export default apiInitializer("1.25.0", (api) => {
}; };
const imageCaptionPopup = api.container.lookup("service:imageCaptionPopup"); const imageCaptionPopup = api.container.lookup("service:imageCaptionPopup");
const settings = api.container.lookup("service:site-settings"); const settings = api.container.lookup("service:site-settings");
const composer = api.container.lookup("service:composer");
const appEvents = api.container.lookup("service:app-events"); const appEvents = api.container.lookup("service:app-events");
const site = api.container.lookup("site:main"); const site = api.container.lookup("site:main");
@ -56,6 +55,8 @@ export default apiInitializer("1.25.0", (api) => {
if (site.mobileView) { if (site.mobileView) {
// Auto-saves caption on mobile view // Auto-saves caption on mobile view
const composer = api.container.lookup("service:composer");
const matchingPlaceholder = const matchingPlaceholder =
composer.model.reply.match(IMAGE_MARKDOWN_REGEX); composer.model.reply.match(IMAGE_MARKDOWN_REGEX);
const match = matchingPlaceholder[imageIndex]; const match = matchingPlaceholder[imageIndex];