Skip to content

Commit d077ee7

Browse files
committed
refactor function lookup
1 parent 7273e6d commit d077ee7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/drawing/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,8 @@ drawing.textPointStyle = function(s, trace, gd) {
943943
}
944944

945945
if(texttemplate) {
946-
var labels = trace._module.formatLabels ? trace._module.formatLabels(d, trace, fullLayout) : {};
946+
var fn = trace._module.formatLabels;
947+
var labels = fn ? fn(d, trace, fullLayout) : {};
947948
var pointValues = {};
948949
appendArrayPointValue(pointValues, trace, d.i);
949950
var meta = trace._meta || {};

0 commit comments

Comments
 (0)