diff --git a/src/App.vue b/src/App.vue index 2cd996e..c0d9e28 100644 --- a/src/App.vue +++ b/src/App.vue @@ -62,6 +62,8 @@ function onConnect(connection: Connection) { } function run() { + if (nodes.value.length === 0) { alert('Add at least one node first.'); return } + if (edges.value.length === 0) { alert('Connect the nodes with at least one wire first.'); return } const graph = buildGraph(nodes.value, edges.value) studio.send({ type: 'load_graph', graph }) }