Skip to content

Commit afbcb18

Browse files
committed
revisit drawOne arguments
1 parent 9101d7a commit afbcb18

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/legend/draw.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ var helpers = require('./helpers');
2525
var MAIN_TITLE = 1;
2626

2727
module.exports = function draw(gd, opts) {
28-
if(!opts) opts = gd._fullLayout.legend || {};
29-
drawOne(gd, opts);
28+
drawOne(gd, opts || gd._fullLayout.legend);
3029
};
3130

32-
function drawOne(gd, legendObj) {
31+
function drawOne(gd, opts) {
32+
var legendObj = opts || {};
33+
3334
var fullLayout = gd._fullLayout;
3435
var clipId, layer;
3536

0 commit comments

Comments
 (0)