diff --git a/nbconvert/preprocessors/execute.py b/nbconvert/preprocessors/execute.py index 2a8aa3a64..382b336e7 100644 --- a/nbconvert/preprocessors/execute.py +++ b/nbconvert/preprocessors/execute.py @@ -489,7 +489,7 @@ def run_cell(self, cell, cell_index=0): cell_map[cell_index] = [] continue elif msg_type.startswith('comm'): - self.widget_state[content['comm_id']] = content['data']['state'] + self.widget_state.setdefault(content['comm_id'], {}).update(content['data']['state']) continue display_id = None