ES6+ syntax trips the legacy UglifyJS compiler
authorAlexander Ebert <ebert@woltlab.com>
Mon, 14 Jun 2021 17:05:23 +0000 (19:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 14 Jun 2021 17:05:23 +0000 (19:05 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js
wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Base.js

index acd351382cef58ca073016ed96c423f97b1577e6..69d3d9ba087d0c4162136bf80a4a326859babc44 100644 (file)
@@ -65,7 +65,11 @@ define([
                        deleteAction.setCallback(this._deleteCallback);
                        
                        _mediaEditor = new MediaEditor({
-                               _editorSuccess: function(media, oldCategoryId, closedEditorDialog = true) {
+                               _editorSuccess: function(media, oldCategoryId, closedEditorDialog) {
+                                       if (closedEditorDialog === undefined) {
+                                               closedEditorDialog = true;
+                                       }
+                                       
                                        if (media.categoryID != oldCategoryId || closedEditorDialog) {
                                                window.setTimeout(function() {
                                                        window.location.reload();
index 2e14f0054da11cc121cc0af2668b429f1400129f..e197d9afe446b7dcf5160e735b3cb8d3ff675947 100644 (file)
@@ -270,7 +270,11 @@ define(
                 * @param       {integer}       oldCategoryId   old category id
                 * @param       {boolean}       closedEditorDialog
                 */
-               _editorSuccess: function(media, oldCategoryId, closedEditorDialog = true) {
+               _editorSuccess: function(media, oldCategoryId, closedEditorDialog) {
+                       if (closedEditorDialog === undefined) {
+                               closedEditorDialog = true;
+                       }
+                       
                        // if the category changed of media changed and category
                        // is selected, check if media list needs to be refreshed
                        if (this._mediaCategorySelect) {