From baa3a1a68c521e0cd8b55e9f40b61a4f086dd06a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 10 Mar 2016 21:45:35 -0800 Subject: [PATCH] Fix handling empty text boxes --- static/js/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 94ef479..10698b0 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -55,7 +55,7 @@ function pairPushed() { return; } target = $('#GFEHostIPField')[0].value; - if (target == null || target == "127.0.0.1") { + if (target == null || target == "") { var e = $("#selectHost")[0]; target = e.options[e.selectedIndex].value; } @@ -74,7 +74,7 @@ function pairPushed() { // otherwise, we assume they selected from the host history dropdown. function showAppsPushed() { target = $('#GFEHostIPField')[0].value; - if (target == null || target == "127.0.0.1") { + if (target == null || target == "") { var e = $("#selectHost")[0]; target = e.options[e.selectedIndex].value; } @@ -94,7 +94,7 @@ function showAppsMode() { // user wants to start a stream. We need the host, game ID, and video settings(?) function startPushed() { target = $('#GFEHostIPField')[0].value; - if (target == null || target == "127.0.0.1" || target == "") { + if (target == null || target == "") { var e = document.getElementById("selectHost"); target = e.options[e.selectedIndex].value; }