diff --git a/spinner/lib/src/main/assets/query.hbs b/spinner/lib/src/main/assets/query.hbs index 6e87f52fb3..7198939ed4 100644 --- a/spinner/lib/src/main/assets/query.hbs +++ b/spinner/lib/src/main/assets/query.hbs @@ -148,9 +148,15 @@ function onQuerySubmitted() { const query = editor.getValue(); - document.getElementById('query').value = query + document.getElementById('query').value = query; let history = getQueryHistory(); + + if (history.length > 0 && history[0] === query) { + console.log('Query already at the top of the history, not saving.'); + return; + } + history.unshift(query); history = history.slice(0, 25);