handle exponent without digits

This commit is contained in:
y21 2023-06-09 04:57:07 +02:00
parent 60258b061d
commit 85002b09a1

View file

@ -161,7 +161,7 @@ impl<'a> NumericLiteral<'a> {
}
if let Some((separator, exponent)) = self.exponent {
if exponent != "0" {
if !exponent.is_empty() && exponent != "0" {
output.push_str(separator);
Self::group_digits(&mut output, exponent, group_size, true, false);
}