Skip to content

Commit 3b08554

Browse files
committed
Reload context menu if this.#reloadContextMenu is true
1 parent 2225182 commit 3b08554

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ts/WoltLabSuite/Core/Component/Interaction/StandaloneButton.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export class StandaloneButton {
4949
}
5050

5151
async #refreshContextMenu(): Promise<void> {
52+
if (!this.#reloadContextMenu) {
53+
return;
54+
}
55+
5256
const response = (await getContextMenuOptions(this.#providerClassName, this.#objectId)).unwrap();
5357

5458
const dropdown = this.#getDropdownMenu();
@@ -62,7 +66,7 @@ export class StandaloneButton {
6266
}
6367

6468
async #refreshHeader(): Promise<void> {
65-
if (!this.#reloadContextMenu || !this.#reloadHeaderEndpoint || !this.#headerCssClassName) {
69+
if (!this.#reloadHeaderEndpoint || !this.#headerCssClassName) {
6670
return;
6771
}
6872

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Interaction/StandaloneButton.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)