Skip to content

Commit 347578e

Browse files
committed
fix subplot deletion
1 parent 2c24945 commit 347578e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/fields/SubplotCreator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ class UnconnectedSingleSubplotCreator extends Component {
3535
}
3636

3737
updateSubplot(update) {
38-
const currentSubplotId = this.props.fullContainer[SUBPLOT_TO_ATTR[this.props.attr].data];
38+
const currentSubplotId = this.props.fullContainer[SUBPLOT_TO_ATTR[this.props.layoutAttr].data];
3939
let subplotToBeGarbageCollected = null;
4040

4141
// When we select another subplot, make sure no unused axes are left
4242
if (
4343
currentSubplotId !== update &&
4444
!this.context.fullData.some(
4545
trace =>
46-
trace[SUBPLOT_TO_ATTR[this.props.attr].data] === currentSubplotId &&
46+
trace[SUBPLOT_TO_ATTR[this.props.layoutAttr].data] === currentSubplotId &&
4747
trace.index !== this.props.fullContainer.index
4848
)
4949
) {

0 commit comments

Comments
 (0)