mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: import and startup error handling bug
This commit is contained in:
parent
a7cd594485
commit
d324998197
@ -44,7 +44,7 @@ function getToastProps(errorLogObj: ErrorLog) {
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
if (!frappe.SystemSettings.autoReportErrors) {
|
||||
if (!frappe.SystemSettings?.autoReportErrors) {
|
||||
Object.assign(props, {
|
||||
actionText: t`Report Error`,
|
||||
action: () => {
|
||||
@ -77,7 +77,7 @@ export function handleError(
|
||||
frappe.errorLog.push(errorLogObj);
|
||||
|
||||
// @ts-ignore
|
||||
if (frappe.SystemSettings.autoReportErrors) {
|
||||
if (frappe.SystemSettings?.autoReportErrors) {
|
||||
reportError(errorLogObj);
|
||||
} else {
|
||||
showToast(getToastProps(errorLogObj));
|
||||
|
@ -3,7 +3,8 @@ import Toast from '@/components/Toast';
|
||||
import router from '@/router';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import frappe from 'frappe';
|
||||
import { isPesa, t } from 'frappe/utils';
|
||||
import { t } from 'frappe';
|
||||
import { isPesa } from 'frappe/utils';
|
||||
import lodash from 'lodash';
|
||||
import Vue from 'vue';
|
||||
import { handleErrorWithDialog } from './errorHandling';
|
||||
|
Loading…
Reference in New Issue
Block a user