diff options
-rw-r--r-- | logikorr.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/logikorr.js b/logikorr.js index c8f0079..111219d 100644 --- a/logikorr.js +++ b/logikorr.js @@ -27,7 +27,11 @@ YUI().use('node-base', 'io-base', 'io-form', 'io-queue', 'json', function (Y) { Y.log(scoreCell); function doUpdate(id, o, args) { var data = o.responseText; - var student = Y.JSON.parse(data); + try { + var student = Y.JSON.parse(data); + } catch (e) { + return null; + }; Y.log(student); while (scoreCell.firstChild) { |