Fix possible panic in web generator

This commit is contained in:
Wildan M 2026-06-24 19:21:38 +07:00
parent d5b63b1f01
commit 49a1cbd938
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79

View File

@ -196,7 +196,7 @@ pub fn generate_html_pkg(
</html>"#,
network_size = format_size(package.network_size),
storage_size = format_size(package.storage_size),
published_short = &package.time_identifier[0..10],
published_short = &package.time_identifier.get(0..10).unwrap_or("-"),
published = package.time_identifier,
blake3 = package.blake3,
);