fix(history): fix incorrect falsey check in getFragment

The getFragment check was checking for only null when it should have
been checking for undefined as well.