If you have a reset button, change the code in the if statement to the following
$('.reset').on('click', function(){ if($('.list-items').length > 1) { $('.list-items:last').remove(); } })
At the moment, you have set your list items as follows.
When a user clicks the delete button, if the number of things with the class list-item does not equal 0, then remove the last list-item
You need to change its code so that it does the following:
When a user clicks the delete button, if the number of things with the class list-item is greater than 1, then remove the last list-item
source share