fix: added throwError global method
(cherry picked from commit 9af300bba8a59cb49ecce26fe5e790fdb646cd99)
This commit is contained in:
parent
b0474e8764
commit
5fff00338a
@ -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,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user