fix npe with offer details volume before prices loaded

This commit is contained in:
woodser 2024-05-21 19:30:44 -04:00
parent b66e6b1c12
commit 0c5ed84996

View file

@ -168,11 +168,11 @@ public class VolumeUtil {
} }
public static String formatVolume(Volume volume, boolean appendCode) { public static String formatVolume(Volume volume, boolean appendCode) {
return formatVolume(volume, getMonetaryFormat(volume.getCurrencyCode()), appendCode); return formatVolume(volume, volume == null ? null : getMonetaryFormat(volume.getCurrencyCode()), appendCode);
} }
public static String formatAverageVolumeWithCode(Volume volume) { public static String formatAverageVolumeWithCode(Volume volume) {
return formatVolume(volume, getMonetaryFormat(volume.getCurrencyCode()).minDecimals(2), true); return formatVolume(volume, volume == null ? null : getMonetaryFormat(volume.getCurrencyCode()).minDecimals(2), true);
} }
public static String formatVolumeLabel(String currencyCode) { public static String formatVolumeLabel(String currencyCode) {