fix: added throwError global method

(cherry picked from commit 9af300bba8a59cb49ecce26fe5e790fdb646cd99)
This commit is contained in:
Shariq Ansari 2025-06-11 14:19:16 +05:30 committed by Mergify
parent b0474e8764
commit 5fff00338a

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,
}