client/context menu: fix data type errors
Some checks failed
Checks / main (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Documentation / Build and Deploy Documentation (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions
/ Check Docker build (Dockerfile) (push) Waiting to run
/ Check Docker build (Dockerfile.alpine) (push) Waiting to run
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v7) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v8) (push) Blocked by required conditions
/ Merge manifest lists (push) Blocked by required conditions
playwright / E2E tests on linux-arm64 (push) Waiting to run
playwright / E2E tests on linux-x64 (push) Waiting to run
Deploy website / Build & deploy website (push) Has been cancelled

This commit is contained in:
Adorian Doran 2025-11-22 13:43:40 +02:00
parent beb7d09aee
commit af62526b92

View File

@ -211,15 +211,15 @@ class ContextMenu {
$group.append($("<div>").addClass("dropdown-divider")); $group.append($("<div>").addClass("dropdown-divider"));
shouldResetGroup = true; // End the group after the next item shouldResetGroup = true; // End the group after the next item
} else if (itemKind === "header") { } else if (itemKind === "header") {
$group.append($("<h6>").addClass("dropdown-header").text(item.title)); $group.append($("<h6>").addClass("dropdown-header").text((item as MenuHeader).title));
shouldResetGroup = true; shouldResetGroup = true;
} else { } else {
if (itemKind === "custom") { if (itemKind === "custom") {
// Custom menu item // Custom menu item
$group.append(this.createCustomMenuItem(item)); $group.append(this.createCustomMenuItem(item as CustomMenuItem));
} else { } else {
// Standard menu item // Standard menu item
$group.append(this.createMenuItem(item)); $group.append(this.createMenuItem(item as MenuCommandItem<any>));
} }
// After adding a menu item, if the previous item was a separator or header, // After adding a menu item, if the previous item was a separator or header,