mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
cleanup: Avoid unnecessary braces
Our coding style has always been to avoid braces when all blocks are single-lines. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
parent
69f63dc94f
commit
67ea424525
38 changed files with 136 additions and 201 deletions
|
|
@ -200,9 +200,8 @@ var ExtensionManager = class {
|
|||
|
||||
createExtensionObject(uuid, dir, type) {
|
||||
let metadataFile = dir.get_child('metadata.json');
|
||||
if (!metadataFile.query_exists(null)) {
|
||||
if (!metadataFile.query_exists(null))
|
||||
throw new Error('Missing metadata.json');
|
||||
}
|
||||
|
||||
let metadataContents, success_;
|
||||
try {
|
||||
|
|
@ -222,14 +221,12 @@ var ExtensionManager = class {
|
|||
let requiredProperties = ['uuid', 'name', 'description', 'shell-version'];
|
||||
for (let i = 0; i < requiredProperties.length; i++) {
|
||||
let prop = requiredProperties[i];
|
||||
if (!meta[prop]) {
|
||||
if (!meta[prop])
|
||||
throw new Error(`missing "${prop}" property in metadata.json`);
|
||||
}
|
||||
}
|
||||
|
||||
if (uuid != meta.uuid) {
|
||||
if (uuid != meta.uuid)
|
||||
throw new Error(`uuid "${meta.uuid}" from metadata.json does not match directory name "${uuid}"`);
|
||||
}
|
||||
|
||||
let extension = {
|
||||
metadata: meta,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue