[BUGFIX beta] Still update HTML5 history if the previous state was null

Fixes #3195, Closes #3580
Merge pull request #4235 from mixonic/3195

[BUGFIX beta] Still update HTML5 history if the previous state was null