mirror of
https://github.com/zadam/trilium.git
synced 2025-12-17 05:39:55 +01:00
client/context menu: fix data type errors
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user