From 475919fb2c262730d495463510a381cbfd4d8893 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sun, 1 Oct 2017 09:07:20 -0400 Subject: [PATCH] fixed website errors --- gyrio/index.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gyrio/index.js b/gyrio/index.js index 3bff473..27ec9a3 100644 --- a/gyrio/index.js +++ b/gyrio/index.js @@ -11,10 +11,10 @@ function hexToRGB(hex) { } function convertData(text, base){ - if(text.length < 150) { - website = ""; - return; - } + // if(text.length < 150) { + // website = ""; + // return; + // } var output = ""; for (var i = 0; i < text.length; i++) { @@ -131,7 +131,12 @@ function getWebsite(url) { } } xhr.send(); - return xhr.responseText; + console.log(xhr.status); + if (xhr.status === 200) { + return xhr.responseText; + } else { + return undefined; + } } function animate(n , input) {