From: Tim Düsterhus Date: Fri, 30 Oct 2020 11:31:34 +0000 (+0100) Subject: Make everything no-empty clean X-Git-Tag: 5.4.0_Alpha_1~666^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57b36106f87c7b1d169db2b39a0a65de97d7e994;p=GitHub%2FWoltLab%2FWCF.git Make everything no-empty clean --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js index 5486296c0a..3ee58dde0f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js @@ -221,7 +221,9 @@ define(["require", "exports", "tslib", "./Status", "../Core", "../Dom/Change/Lis try { data = JSON.parse(xhr.responseText); } - catch (e) { } + catch (e) { + // Ignore JSON parsing failure. + } let showError = true; if (typeof options.failure === "function") { showError = options.failure(data || {}, xhr.responseText || "", xhr, options.data); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Devtools.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Devtools.js index b6261f969a..d8d04ecb37 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Devtools.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Devtools.js @@ -66,7 +66,9 @@ define(["require", "exports"], function (require, exports) { _settings = JSON.parse(settings); } } - catch (e) { } + catch (e) { + // Ignore JSON parsing failure. + } if (!_settings.editorAutosave) Devtools.toggleEditorAutosave(true); if (_settings.eventLogging) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js index e4ffc91246..aac7f6be6f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js @@ -33,7 +33,9 @@ define(["require", "exports", "tslib", "../../Core", "../../Dom/Traverse", "../. }); } } - catch (e) { } + catch (e) { + // Ignore JSON parsing failure. + } if (objectType) { parameters.set("types[]", objectType); } diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Request.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Request.ts index 70ae46425e..e12e8fca9c 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Request.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Request.ts @@ -264,7 +264,9 @@ class AjaxRequest { let data: ResponseData | null = null; try { data = JSON.parse(xhr.responseText); - } catch (e) {} + } catch (e) { + // Ignore JSON parsing failure. + } let showError = true; if (typeof options.failure === "function") { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Devtools.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Devtools.ts index aca831d041..62e8b0c685 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Devtools.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Devtools.ts @@ -78,7 +78,9 @@ const Devtools = { if (settings !== null) { _settings = JSON.parse(settings); } - } catch (e) {} + } catch (e) { + // Ignore JSON parsing failure. + } if (!_settings.editorAutosave) Devtools.toggleEditorAutosave(true); if (_settings.eventLogging) Devtools.toggleEventLogging(true); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Page.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Page.ts index 8f06c2da2c..6f69d68697 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Page.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Page.ts @@ -34,7 +34,9 @@ function click(event: MouseEvent): void { parameters.set(key, data[key]); }); } - } catch (e) {} + } catch (e) { + // Ignore JSON parsing failure. + } if (objectType) { parameters.set("types[]", objectType);