Skip to content

Commit 23d1db5

Browse files
authored
Fix advanced links (#101)
* Save the data of the advanced links in the content * Avoid console error if the header has no first child * Remove totally useless statement
1 parent d468bf5 commit 23d1db5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

gluepyter/glue_ydoc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ def add_links_to_contents(self, links: Dict[str, Dict], contents: Dict):
251251
list_name = f"list{'' if lists_count < 0 else f'_{lists_count}'}"
252252
lists_count += 1
253253
link.pop(f"cids{i}_labels", None)
254-
link.pop(f"data{i}", None)
255254
attr_list = {
256255
"_type": "builtins.list",
257256
"contents": link.pop(f"cids{i}", []),

src/linkPanel/linkEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class LinkEditor extends BoxPanel {
6060
);
6161
maxHeight = Math.max(
6262
...headers.map(
63-
header => (header?.node.firstChild as HTMLElement).offsetHeight || 0
63+
header => (header?.node.firstChild as HTMLElement)?.offsetHeight || 0
6464
)
6565
);
6666
headers.forEach(header => {

0 commit comments

Comments
 (0)