Skip to content

Commit c22a69f

Browse files
committed
fix: errors thrown by launch_app
Fixes errors that were noticed being thrown by launch_app, specifically in the branch of logic when launch_app is called NOT via ExecService. This branch of logic was added to fix an issue where notepad wasn't prompting to save unsaved changes on close because data-appusessdk was not properly set to true. The fix still worked, despite throwing these errors, because setting data-appUsesSDK to true is the first thing it does. However, broadcast messages to apps launched with launch_app NOT via ExecService would have been broken.
1 parent a9bbcf9 commit c22a69f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gui/src/helpers/launch_app.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,8 @@ const launch_app = async (options)=>{
368368

369369
$(process.references.iframe).attr('data-appUsesSDK', 'true');
370370

371-
send_child_launched_msg({ uses_sdk: true });
372-
373371
// Send any saved broadcasts to the new app
374-
globalThis.services.get('broadcast').sendSavedBroadcastsTo(child_instance_id);
372+
globalThis.services.get('broadcast').sendSavedBroadcastsTo(uuid);
375373

376374
// If `window-active` is set (meanign the window is focused), focus the window one more time
377375
// this is to ensure that the iframe is `definitely` focused and can receive keyboard events (e.g. keydown)

0 commit comments

Comments
 (0)