2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 01:14:03 +00:00

fix: import and startup error handling bug

This commit is contained in:
18alantom 2022-01-31 13:15:51 +05:30
parent a7cd594485
commit d324998197
2 changed files with 4 additions and 3 deletions

View File

@ -44,7 +44,7 @@ function getToastProps(errorLogObj: ErrorLog) {
}; };
// @ts-ignore // @ts-ignore
if (!frappe.SystemSettings.autoReportErrors) { if (!frappe.SystemSettings?.autoReportErrors) {
Object.assign(props, { Object.assign(props, {
actionText: t`Report Error`, actionText: t`Report Error`,
action: () => { action: () => {
@ -77,7 +77,7 @@ export function handleError(
frappe.errorLog.push(errorLogObj); frappe.errorLog.push(errorLogObj);
// @ts-ignore // @ts-ignore
if (frappe.SystemSettings.autoReportErrors) { if (frappe.SystemSettings?.autoReportErrors) {
reportError(errorLogObj); reportError(errorLogObj);
} else { } else {
showToast(getToastProps(errorLogObj)); showToast(getToastProps(errorLogObj));

View File

@ -3,7 +3,8 @@ import Toast from '@/components/Toast';
import router from '@/router'; import router from '@/router';
import { ipcRenderer } from 'electron'; import { ipcRenderer } from 'electron';
import frappe from 'frappe'; import frappe from 'frappe';
import { isPesa, t } from 'frappe/utils'; import { t } from 'frappe';
import { isPesa } from 'frappe/utils';
import lodash from 'lodash'; import lodash from 'lodash';
import Vue from 'vue'; import Vue from 'vue';
import { handleErrorWithDialog } from './errorHandling'; import { handleErrorWithDialog } from './errorHandling';