mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
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:
parent
0a13c12b1f
commit
284ec8a74f
@ -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 = "";
|
||||
|
Loading…
Reference in New Issue
Block a user