Make everything no-empty clean
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 30 Oct 2020 11:31:34 +0000 (12:31 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 30 Oct 2020 11:33:41 +0000 (12:33 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js
wcfsetup/install/files/js/WoltLabSuite/Core/Devtools.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Page.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Request.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Devtools.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Page.ts

index 5486296c0aee6f1802a8018a94ee7dccabdafab7..3ee58dde0f44ff06fca4a774358e37a9dabc9e39 100644 (file)
@@ -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);
index b6261f969a927d2b77796c349767d5fba713d4dc..d8d04ecb37d61f0080e832a332b6bb08d8b8eff6 100644 (file)
@@ -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)
index e4ffc9124606d432a9a621202837ca57c15e19bd..aac7f6be6f00ea3e9f41baa8347c8181088d2ad7 100644 (file)
@@ -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);
         }
index 70ae46425e7917e2e4bb31e32791a91e062c6be0..e12e8fca9c50f173fa630be97a136a5ddc1989b5 100644 (file)
@@ -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") {
index aca831d0417b01510588aedad2b1b5ef467dd30e..62e8b0c68523ab7bb5e2dbbd77b8492c5c579a62 100644 (file)
@@ -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);
index 8f06c2da2c73f58a20359ff49014cf1206e23319..6f69d6869777fba002e1185e52b2e567bcd1755c 100644 (file)
@@ -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);