[hotfix] Fallback for indicator_formatter doc (#4985)

This commit is contained in:
Faris Ansari 2018-02-08 13:09:54 +05:30 committed by GitHub
parent 408c2f8c61
commit ebbc28ce4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -437,7 +437,7 @@ _f.Frm.prototype.set_indicator_formatter = function(fieldname, get_color, get_te
function(value, df, options, doc) {
if(value) {
return repl('<a class="indicator %(color)s" href="#Form/%(doctype)s/%(name)s">%(label)s</a>', {
color: get_color(doc),
color: get_color(doc || {}),
doctype: df.options,
name: value,
label: get_text ? get_text(doc) : value