cleanup: Don't shadow variables
Having variables that share the same name in overlapping scopes is confusing and error-prone, and is best avoided. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
2e4e2500dd
commit
682bd7e97c
@ -217,12 +217,12 @@ class RunDialog extends ModalDialog.ModalDialog {
|
||||
try {
|
||||
Gio.app_info_launch_default_for_uri(file.get_uri(),
|
||||
global.create_app_launch_context(0, -1));
|
||||
} catch (e) {
|
||||
} catch (err) {
|
||||
// The exception from gjs contains an error string like:
|
||||
// Error invoking Gio.app_info_launch_default_for_uri: No application
|
||||
// is registered as handling this file
|
||||
// We are only interested in the part after the first colon.
|
||||
let message = e.message.replace(/[^:]*: *(.+)/, '$1');
|
||||
let message = err.message.replace(/[^:]*: *(.+)/, '$1');
|
||||
this._showError(message);
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user