replacing empty string with empty object in history.pushstate