Represent empty IV cells as null.

GitOrigin-RevId: 2a087121c7a676e95165b72ed09e002c2323ddd8
This commit is contained in:
levlam 2019-09-27 03:42:26 +03:00
parent 17cc3b93f0
commit 33d684d684
2 changed files with 3 additions and 3 deletions

View File

@ -787,7 +787,7 @@ pageBlockVerticalAlignmentMiddle = PageBlockVerticalAlignment;
//@description The content should be bottom-aligned
pageBlockVerticalAlignmentBottom = PageBlockVerticalAlignment;
//@description Represents a cell of a table @text Cell text @is_header True, if it is a header cell
//@description Represents a cell of a table @text Cell text; may be null. If the text is null, then the cell should be invisible @is_header True, if it is a header cell
//@colspan The number of columns the cell should span @rowspan The number of rows the cell should span
//@align Horizontal cell content alignment @valign Vertical cell content alignment
pageBlockTableCell text:RichText is_header:Bool colspan:int32 rowspan:int32 align:PageBlockHorizontalAlignment valign:PageBlockVerticalAlignment = PageBlockTableCell;

View File

@ -236,8 +236,8 @@ class WebPageBlockTableCell {
UNREACHABLE();
return nullptr;
}();
return td_api::make_object<td_api::pageBlockTableCell>(text.get_rich_text_object(), is_header, colspan, rowspan,
std::move(align), std::move(valign));
return td_api::make_object<td_api::pageBlockTableCell>(text.empty() ? null : text.get_rich_text_object(), is_header,
colspan, rowspan, std::move(align), std::move(valign));
}
template <class StorerT>