Return before testing replaceState