refactor(touchbar): unnecessary typecast

This commit is contained in:
Elian Doran 2025-04-13 20:06:58 +03:00
parent 4161bc17e1
commit 904e8f724d
No known key found for this signature in database

View File

@ -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();
});
}