Fix delete post modal

Closes #2999
-Handle undefined argument being passed into openModal function