mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-11 11:02:27 +08:00
refactor(touchbar): unnecessary typecast
This commit is contained in:
parent
4161bc17e1
commit
904e8f724d
@ -25,8 +25,7 @@ export default class TouchBarWidget extends NoteContextAwareWidget {
|
|||||||
$(window).on("focusin", async (e) => {
|
$(window).on("focusin", async (e) => {
|
||||||
const target = e.target;
|
const target = e.target;
|
||||||
const parentComponentEl = $(target).closest(".component");
|
const parentComponentEl = $(target).closest(".component");
|
||||||
// TODO: Remove typecast once it's no longer necessary.
|
this.lastFocusedComponent = appContext.getComponentByEl(parentComponentEl[0]);
|
||||||
this.lastFocusedComponent = appContext.getComponentByEl(parentComponentEl[0]) as Component;
|
|
||||||
this.#refreshTouchBar();
|
this.#refreshTouchBar();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user