mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
cleanup: Avoid implicit coercion
Converting a variable to a particular type can be done explicitly (with functions like Number() or toString()) or implicitly by relying on type coercion (like concatenating a variable to the empty string to force a string, or multiplying it with 1 to force a number). As those tend to be less readable and clear, they are best avoided. So replace the cases of string coercion we use with template strings, and clarify the places that can be confused with number coercion. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
parent
e56d7f5021
commit
e2e02c9a2f
6 changed files with 8 additions and 8 deletions
|
|
@ -147,7 +147,7 @@ function logExtensionError(uuid, error) {
|
|||
if (!extension)
|
||||
return;
|
||||
|
||||
let message = '' + error;
|
||||
let message = `${error}`;
|
||||
|
||||
extension.state = ExtensionState.ERROR;
|
||||
if (!extension.errors)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue