We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a98258a commit 4ecf18cCopy full SHA for 4ecf18c
sandbox/Sandbox.jsx
@@ -163,7 +163,7 @@ export default class Sandbox extends React.Component {
163
* Remove a node.
164
*/
165
onClickRemoveNode = () => {
166
- if (this.state.data.nodes && this.state.data.nodes.length) {
+ if (this.state.data.nodes && this.state.data.nodes.length > 1) {
167
const id = this.state.data.nodes[0].id;
168
169
this.state.data.nodes.splice(0, 1);
@@ -172,7 +172,7 @@ export default class Sandbox extends React.Component {
172
173
this.setState({ data });
174
} else {
175
- toast("No more nodes to remove!");
+ toast("Need to have at least one node!");
176
}
177
};
178
0 commit comments