Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 18, 2022
1 parent efa46c3 commit b360336
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ipywidgets_bokeh/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ export class WidgetManager extends HTMLManager {
this.kernel = this.kernel_manager.connectTo({model: kernel_model, handleComms: true})
this.kernel.registerCommTarget(this.comm_target_name, (comm, msg) => {
const model = this._model_objs[msg.content.comm_id]
if (model != null && !model.comm_live) {
const comm_wrapper = new shims.services.Comm(comm)
this._attach_comm(comm_wrapper, model);
if (model != null) {
const comm_wrapper = new shims.services.Comm(comm)
this._attach_comm(comm_wrapper, model);
}
})
}
Expand All @@ -144,15 +144,15 @@ export class WidgetManager extends HTMLManager {
try {
const models = await this.set_state(state)
for (const model of models) {
const comm = await this._create_comm('jupyter.widget', model.model_id)
this._attach_comm(comm, model);
this._model_objs[model.model_id] = model
const comm = await this._create_comm(this.comm_target_name, model.model_id)
this._attach_comm(comm, model);
this._model_objs[model.model_id] = model
}
const model = models.find((item) => item.model_id == spec.model_id)

if (model != null) {
const view = await this.create_view(model, {el})
await this.display_view(view, el)
await this.display_view(view, el)
}
} finally {
for (const id in new_models) {
Expand Down

0 comments on commit b360336

Please sign in to comment.