There needs to be a semicolon or line break before the fi:
fi
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi