diff options
Diffstat (limited to 'azalea-chat')
| -rw-r--r-- | azalea-chat/src/component.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 637aafc7..c64ee559 100644 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -408,6 +408,9 @@ impl<'de> Deserialize<'de> for FormattedText { )); } let json_array = json.as_array().unwrap(); + if json_array.is_empty() { + return Ok(FormattedText::default()); + } // the first item in the array is the one that we're gonna return, the others // are siblings let mut component = |
