Removes the edited item if its emtpy.