aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/util/prefs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/util/prefs.rs b/components/util/prefs.rs
index a197a1544c6..d0d96a93035 100644
--- a/components/util/prefs.rs
+++ b/components/util/prefs.rs
@@ -15,7 +15,7 @@ use std::sync::{Arc, Mutex};
lazy_static! {
pub static ref PREFS: Preferences = {
- let prefs = read_prefs().unwrap_or(HashMap::new());
+ let prefs = read_prefs().unwrap_or_else(|_| HashMap::new());
Preferences(Arc::new(Mutex::new(prefs)))
};
}