.get() does not work in JavaScript.

This commit is contained in:
Sachin Mane 2019-05-20 18:55:33 +05:30
parent b1c63dbe95
commit 90c62d0c99

View file

@ -198,7 +198,7 @@ frappe.request.call = function(opts) {
headers: Object.assign({
"X-Frappe-CSRF-Token": frappe.csrf_token,
"Accept": "application/json",
"X-Frappe-CMD": opts.get('args', {}).get('cmd', '')
"X-Frappe-CMD": (opts.args && opts.args.cmd || '') || ''
}, opts.headers),
cache: false
};