Skip to content

Commit

Permalink
removed redundant return data
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmelnikov82 committed May 27, 2022
1 parent eed9bbf commit ae1b087
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2650,22 +2650,20 @@ axes.drawOne = function(gd, ax, opts) {
};

function filterPush(push, automargin) {
if(!push) return push;
if(!push) return;

var keepMargin = Object.keys(MARGIN_MAPPING).reduce(function(data, nextKey) {
if(automargin.indexOf(nextKey) !== -1) {
MARGIN_MAPPING[nextKey].forEach(function(key) { data[key] = 1;});
}
return data;
}, {});

Object.keys(push).forEach(function(key) {
if(!keepMargin[key]) {
if(key.length === 1) push[key] = 0;
else delete push[key];
}
});
return push;
}

function getBoundaryVals(ax, vals) {
Expand Down

0 comments on commit ae1b087

Please sign in to comment.