mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +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) => {
|
||||
const target = e.target;
|
||||
const parentComponentEl = $(target).closest(".component");
|
||||
// TODO: Remove typecast once it's no longer necessary.
|
||||
this.lastFocusedComponent = appContext.getComponentByEl(parentComponentEl[0]) as Component;
|
||||
this.lastFocusedComponent = appContext.getComponentByEl(parentComponentEl[0]);
|
||||
this.#refreshTouchBar();
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user