mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Prevent panic during grid-template serialization
This commit is contained in:
parent
1b6d29e319
commit
46780ceb0d
1 changed files with 4 additions and 1 deletions
|
@ -374,7 +374,10 @@
|
|||
Either::First(ref areas) => {
|
||||
let track_list = match *template_rows {
|
||||
GenericGridTemplateComponent::TrackList(ref list) => list,
|
||||
_ => unreachable!(), // should exist!
|
||||
// Others template components shouldn't exist with normal shorthand values.
|
||||
// But if we need to serialize a group of longhand sub-properties for
|
||||
// the shorthand, we should be able to return empty string instead of crashing.
|
||||
_ => return Ok(()),
|
||||
};
|
||||
|
||||
let mut names_iter = track_list.line_names.iter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue