mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
refactor: 💡 remove redundant code
This commit is contained in:
@@ -419,13 +419,13 @@ export default class TabRowWidget extends BasicWidget {
|
||||
closeActiveTabCommand({ $el }: CommandListenerData<"closeActiveTab">) {
|
||||
const ntxId = $el.closest(".note-tab").attr("data-ntx-id");
|
||||
|
||||
appContext.tabManager.removeNoteContext(ntxId ?? null);
|
||||
appContext.tabManager.removeNoteContext(ntxId);
|
||||
}
|
||||
|
||||
setTabCloseEvent($tab: JQuery<HTMLElement>) {
|
||||
$tab.on("mousedown", (e) => {
|
||||
if (e.which === 2) {
|
||||
appContext.tabManager.removeNoteContext($tab.attr("data-ntx-id") ?? null);
|
||||
appContext.tabManager.removeNoteContext($tab.attr("data-ntx-id"));
|
||||
|
||||
return true; // event has been handled
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user