Skip to content

Commit

Permalink
Fix a crash with flex items breaks
Browse files Browse the repository at this point in the history
Related to #583.
  • Loading branch information
liZe committed Mar 22, 2018
1 parent 5cb850d commit 07bd39e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion weasyprint/layout/flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

2 comments on commit 07bd39e

@jcpyun
Copy link

@jcpyun jcpyun commented on 07bd39e Mar 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Will there will be packaged version 0.42.3 coming up soon with flex support?

@liZe
Copy link
Member Author

@liZe liZe commented on 07bd39e Mar 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Will there will be packaged version 0.42.3 coming up soon with flex support?

I'm afraid flexbox support will never be backported to the 0.42.x branch. We'll have to wait for 43!

Please sign in to comment.