Skip to content

Commit a48734f

Browse files
committed
Use safe stringify in more spots in list monitor
1 parent b97d194 commit a48734f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/containers/list-monitor.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class ListMonitor extends React.Component {
7676
const newIndex = this.wrapListIndex(previouslyActiveIndex + navigateDirection, this.props.value.length);
7777
this.setState({
7878
activeIndex: newIndex,
79-
activeValue: this.props.value[newIndex]
79+
activeValue: safeStringify(this.props.value[newIndex])
8080
});
8181
e.preventDefault(); // Stop default tab behavior, handled by this state change
8282
} else if (e.key === 'Enter') {
@@ -111,7 +111,7 @@ class ListMonitor extends React.Component {
111111
const newActiveIndex = Math.min(newListValue.length - 1, this.state.activeIndex);
112112
this.setState({
113113
activeIndex: newActiveIndex,
114-
activeValue: newListValue[newActiveIndex]
114+
activeValue: safeStringify(newListValue[newActiveIndex])
115115
});
116116
}
117117

0 commit comments

Comments
 (0)