mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
feat: auto report also hides error toast
This commit is contained in:
parent
6440455470
commit
31ca1389ae
@ -99,11 +99,11 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
fieldname: 'autoReportErrors',
|
||||
label: 'Auto Report Errors',
|
||||
label: 'Hide & Auto Report Errors',
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
description: t(
|
||||
'Automatically report all errors. User will still be notified when an error pops up.'
|
||||
'Prevent errors from showing and automatically report all errors.'
|
||||
),
|
||||
},
|
||||
],
|
||||
|
@ -76,10 +76,11 @@ export function handleError(
|
||||
// @ts-ignore
|
||||
frappe.errorLog.push(errorLogObj);
|
||||
|
||||
showToast(getToastProps(errorLogObj));
|
||||
// @ts-ignore
|
||||
if (frappe.SystemSettings.autoReportErrors) {
|
||||
reportError(errorLogObj);
|
||||
} else {
|
||||
showToast(getToastProps(errorLogObj));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user