Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 28, 2024
1 parent 9989005 commit 2cadbc2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frontend/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ const AnyWidgetSlot = (props: Props) => {
* @param widgetDef - The anywidget definition
* @param model - The model to pass to the widget
*/
async function runAnyWidgetModule(widgetDef: AnyWidget, model: Model<T>, el: HTMLElement) {
const widget = typeof widgetDef === "function" ? await widgetDef() : widgetDef;
async function runAnyWidgetModule(
widgetDef: AnyWidget,
model: Model<T>,
el: HTMLElement,
) {
const widget =
typeof widgetDef === "function" ? await widgetDef() : widgetDef;
await widget.initialize?.({ model });
await widget.render?.({ model, el });
}
Expand Down Expand Up @@ -155,7 +160,7 @@ class Model<T extends Record<string, any>> implements AnyModel<T> {
private send_to_widget: (req: { content?: any }) => Promise<
null | undefined
>,
) { }
) {}

off(eventName?: string | null, callback?: EventHandler | null): void {
if (!eventName) {
Expand Down

0 comments on commit 2cadbc2

Please sign in to comment.