Browse Source
Only construct JSON object if it's useful
pull/1546/head
Jake Howard
4 years ago
No known key found for this signature in database
GPG Key ID: 57AFB45680EDD477
1 changed files with
1 additions and
1 deletions
-
src/db/models/cipher.rs
|
|
@ -104,7 +104,7 @@ impl Cipher { |
|
|
|
|
|
|
|
// Get the type_data or a default to an empty json object '{}'.
|
|
|
|
// If not passing an empty object, mobile clients will crash.
|
|
|
|
let mut type_data_json: Value = serde_json::from_str(&self.data).unwrap_or(json!({})); |
|
|
|
let mut type_data_json: Value = serde_json::from_str(&self.data).unwrap_or_else(|_| json!({})); |
|
|
|
|
|
|
|
// NOTE: This was marked as *Backwards Compatibilty Code*, but as of January 2021 this is still being used by upstream
|
|
|
|
// Set the first element of the Uris array as Uri, this is needed several (mobile) clients.
|
|
|
|