Skip to content

Commit f01bab9

Browse files
committed
cleanData should modify textposition in place
so as to not muck up plotly.react immutable logic
1 parent 3c56243 commit f01bab9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plot_api/helpers.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ exports.cleanData = function(data, existingData) {
283283

284284
if(!Registry.traceIs(trace, 'pie') && !Registry.traceIs(trace, 'bar')) {
285285
if(Array.isArray(trace.textposition)) {
286-
trace.textposition = trace.textposition.map(cleanTextPosition);
286+
for(i = 0; i < trace.textposition.length; i++) {
287+
trace.textposition[i] = cleanTextPosition(trace.textposition[i]);
288+
}
287289
}
288290
else if(trace.textposition) {
289291
trace.textposition = cleanTextPosition(trace.textposition);

0 commit comments

Comments
 (0)