Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions altair/jupyter/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function render({ model, el }) {

// Param change callback
model.on('change:_params', async (new_params) => {
for (const [param, value] of Object.entries(new_params.changed._params)) {
for (const [param, value] of Object.entries(new_params.changed ? new_params.changed._params : new_params)) {
api.view.signal(param, value);
}
await api.view.runAsync();
Expand Down Expand Up @@ -128,7 +128,8 @@ async function render({ model, el }) {

// Add signal/data updaters
model.on('change:_py_to_js_updates', async (updates) => {
for (const update of updates.changed._py_to_js_updates ?? []) {
const py_to_js_updates = updates.changed ? updates.changed._py_to_js_updates : updates;
for (const update of py_to_js_updates ?? []) {
if (update.namespace === "signal") {
setSignalValue(api.view, update.name, update.scope, update.value);
} else if (update.namespace === "data") {
Expand Down