Skip to content

Conversation

@personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Sep 10, 2025

Summary

Prior to this pull request, calling shim.showMessageBox with only one argument (using the default second argument) resulted to an error logged to the console with no message shown. The error was caused by an attempt to access the type property on a null options object.

This error occurred when shim.showMessageBox passed null, its default options, to bridge.showMessageBox as options. In this case, the default parameter value for options of {} was not applied because JavaScript default parameters only apply if a parameter is missing or if undefined (rather than null).

shim.showMessageBox is called with one argument in cases including when deleting a folder fails.

Testing

  1. Update Folder.moveToFolder to always throw.
  2. Move a folder using right-click > "move to notebook".
  3. Verify that an error dialog is shown.

@personalizedrefrigerator personalizedrefrigerator changed the title Desktop: Fix "move to" error dialog is not shown on error Desktop: Fix error dialogs fail to appear in certain cases Sep 10, 2025
@laurent22 laurent22 merged commit 110d5bd into laurent22:dev Sep 13, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants