2
0
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:
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
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));

View File

@ -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';