fix: added throwError global method

This commit is contained in:
Shariq Ansari 2025-06-11 14:19:16 +05:30
parent 7d79cbf5bd
commit 9af300bba8

View File

@ -46,6 +46,11 @@ export function getScript(doctype, view = 'Form') {
helpers.router = router
helpers.call = call
helpers.throwError = (message) => {
toast.error(message || __('An error occurred'))
throw new Error(message || __('An error occurred'))
}
helpers.crm = {
makePhoneCall: makeCall,
}