Fix delete post modal controller

Closes #2999
-Handle undefined argument being passed into modal component