mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] debug tools: do not crash on non json-stringifiable props
closes #595
This commit is contained in:
+6
-1
@@ -35,7 +35,12 @@
|
||||
});
|
||||
|
||||
function toStr(obj) {
|
||||
let str = JSON.stringify(obj || {});
|
||||
let str;
|
||||
try {
|
||||
str = JSON.stringify(obj || {});
|
||||
} catch (e) {
|
||||
str = "<JSON error>";
|
||||
}
|
||||
if (str.length > 200) {
|
||||
str = str.slice(0, 200) + "...";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user