Skip to content

Commit

Permalink
fix: support for Voila 0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Mar 30, 2022
1 parent bfa919b commit c0c256e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion example_site/voila-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ async function init(voilaUrl, notebook) {
kernel._kernelSession = '_RESTARTING_';

const widgetManager = getWidgetManager(voila, kernel);
await widgetManager._build_models();

if (widgetManager._build_models) {
await widgetManager._build_models();
} else {
/* Voila >= 0.3.4 */
await widgetManager._loadFromKernel();
}

Object.values(widgetManager._models)
.map(async (modelPromise) => {
Expand Down

0 comments on commit c0c256e

Please sign in to comment.