Fix handling empty text boxes

This commit is contained in:
Cameron Gutman 2016-03-10 21:45:35 -08:00
parent a8022f3187
commit baa3a1a68c

View File

@ -55,7 +55,7 @@ function pairPushed() {
return; return;
} }
target = $('#GFEHostIPField')[0].value; target = $('#GFEHostIPField')[0].value;
if (target == null || target == "127.0.0.1") { if (target == null || target == "") {
var e = $("#selectHost")[0]; var e = $("#selectHost")[0];
target = e.options[e.selectedIndex].value; target = e.options[e.selectedIndex].value;
} }
@ -74,7 +74,7 @@ function pairPushed() {
// otherwise, we assume they selected from the host history dropdown. // otherwise, we assume they selected from the host history dropdown.
function showAppsPushed() { function showAppsPushed() {
target = $('#GFEHostIPField')[0].value; target = $('#GFEHostIPField')[0].value;
if (target == null || target == "127.0.0.1") { if (target == null || target == "") {
var e = $("#selectHost")[0]; var e = $("#selectHost")[0];
target = e.options[e.selectedIndex].value; 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(?) // user wants to start a stream. We need the host, game ID, and video settings(?)
function startPushed() { function startPushed() {
target = $('#GFEHostIPField')[0].value; target = $('#GFEHostIPField')[0].value;
if (target == null || target == "127.0.0.1" || target == "") { if (target == null || target == "") {
var e = document.getElementById("selectHost"); var e = document.getElementById("selectHost");
target = e.options[e.selectedIndex].value; target = e.options[e.selectedIndex].value;
} }