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:
parent
a7cd594485
commit
d324998197
@ -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));
|
||||||
|
@ -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';
|
||||||
|
Loading…
Reference in New Issue
Block a user