From 913005f78ef17b9a36f43331abbaaa50d5fd1240 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 10 Dec 2024 16:48:12 +0100 Subject: [PATCH] Fix empty object name in confirmation message --- ts/WoltLabSuite/Core/Component/GridView/Action/Delete.ts | 2 +- .../js/WoltLabSuite/Core/Component/GridView/Action/Delete.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/GridView/Action/Delete.ts b/ts/WoltLabSuite/Core/Component/GridView/Action/Delete.ts index e3a81d1ace..ed32caade3 100644 --- a/ts/WoltLabSuite/Core/Component/GridView/Action/Delete.ts +++ b/ts/WoltLabSuite/Core/Component/GridView/Action/Delete.ts @@ -3,7 +3,7 @@ import { confirmationFactory } from "../../Confirmation"; import * as UiNotification from "WoltLabSuite/Core/Ui/Notification"; async function handleDelete(row: HTMLTableRowElement, objectName: string, endpoint: string): Promise { - const confirmationResult = await confirmationFactory().delete(objectName); + const confirmationResult = await confirmationFactory().delete(objectName ? objectName : undefined); if (!confirmationResult) { return; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GridView/Action/Delete.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GridView/Action/Delete.js index 751f8ebc35..f22c23f8c6 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GridView/Action/Delete.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GridView/Action/Delete.js @@ -4,7 +4,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Api/DeleteObject", ".. exports.setup = setup; UiNotification = tslib_1.__importStar(UiNotification); async function handleDelete(row, objectName, endpoint) { - const confirmationResult = await (0, Confirmation_1.confirmationFactory)().delete(objectName); + const confirmationResult = await (0, Confirmation_1.confirmationFactory)().delete(objectName ? objectName : undefined); if (!confirmationResult) { return; } -- 2.20.1