From 515f4d10c35ac14d33ffd032e1cf958b501e1965 Mon Sep 17 00:00:00 2001 From: Dan Wilkerson Date: Sun, 14 Feb 2016 17:11:48 -0500 Subject: [PATCH] Switched to $.getJSON for auto-parsing to fix versions reloading --- js/version/version.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/js/version/version.js b/js/version/version.js index 9a9a682c..20cbf11a 100644 --- a/js/version/version.js +++ b/js/version/version.js @@ -8,20 +8,14 @@ var version = { */ version.checkVersion = function () { - $.ajax({ - type: 'GET', - url: 'controllers/hash.php', - success: function (data) { + $.getJSON('controllers/hash.php') + .success(function(data) { // The githash variable is located in index.php if (data && data.gitHash !== gitHash) { window.location.reload(); window.location.href = window.location.href; - } - }, - error: function () { - - } - }); + } + }); }