Skip to content

Commit db730df

Browse files
chore: fix comment for pack_models
1 parent ac64a2a commit db730df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/base/src/widget.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ export function unpack_models(
7070

7171
/** Replace models with ids recursively.
7272
*
73-
* If the commonly-used `unpack_models` is given as the `seralize` method,
74-
* and no `deserialize` is given, this will be used as a default.
73+
* If the commonly-used `unpack_models` is given as the `deseralize` method,
74+
* pack_models would be the appropriate `serialize`.
75+
* However, the default serialize method will have the same effect, when
76+
* `unpack_models` is used as the deserialize method.
77+
* This is to ensure backwards compatibility, see:
78+
* https://github.com/jupyter-widgets/ipywidgets/pull/3738/commits/f9e27328bb631eb5247a7a6563595d3e655492c7#diff-efb19099381ae8911dd7f69b015a0138d08da7164512c1ee112aa75100bc9be2
7579
*/
7680
export function pack_models(
7781
value: WidgetModel | Dict<WidgetModel> | WidgetModel[] | any,

0 commit comments

Comments
 (0)