diff --git a/weasyprint/layout/flex.py b/weasyprint/layout/flex.py index 748541be0..2ff22086d 100644 --- a/weasyprint/layout/flex.py +++ b/weasyprint/layout/flex.py @@ -778,7 +778,10 @@ def flex_layout(context, box, max_position_y, skip_stack, containing_block, list_marker_layout(context, new_child) box.children.append(new_child) if child_resume_at is not None: - resume_at = (resume_at[0], child_resume_at) + if resume_at: + resume_at = (resume_at[0], child_resume_at) + else: + resume_at = (0, child_resume_at) # Set box height if axis == 'width' and box.height == 'auto':