Skip to content

Commit 45230f8

Browse files
author
cht
committed
解决更新后json不兼容问题
1 parent 9f4f866 commit 45230f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,6 @@ pub fn start() -> Vec<Vec<Information>> {
9292
"[]".to_string()
9393
}
9494
};
95-
serde_json::from_str(messages.as_str()).unwrap()
95+
// 如果发生错误,就不读取
96+
serde_json::from_str(messages.as_str()).unwrap_or(vec![])
9697
}

0 commit comments

Comments
 (0)