diff --git a/build.html b/build.html
index 2cb47895f589..123c5f4e6a06 100644
--- a/build.html
+++ b/build.html
@@ -229,7 +229,7 @@
if (supported_os.length) {
document.getElementById('osSelectDiv').style.display = 'block';
} else {
- if (history.state != '') {
+ if (history.state !== '' && history.state !== null) {
history.pushState('', '', 'build.html');
}
document.getElementById('osSelectDiv').style.display = 'none';