Fix Delete when only one Snippet

## Description
The note page hangs when trying to delete the last snippet. This fix will break out of the loop when there are not any previous elements to delete.

This will resolve #40.

### Testing Considerations
* [x] Ensure delete doesn't hang when deleting last snippet in note