Check for null keys in settings view model

The keys to format in the settings view model might be null. This avoid crashing
the UI by testing for this case.
This commit is contained in:
J. Ryan Stinnett 2021-08-31 16:11:31 +01:00
parent 0a13c12b1f
commit 284ec8a74f

View file

@ -28,6 +28,9 @@ class PushNotificationStatus {
}
function formatKey(key) {
if (!key) {
return null;
}
const partLength = 4;
const partCount = Math.ceil(key.length / partLength);
let formattedKey = "";