Fixed submission bug when adblocker is present

This commit is contained in:
David Baldwynn 2017-07-26 22:33:01 -04:00
parent 0f3f23f3f1
commit 46d71481da

View File

@ -302,6 +302,12 @@ angular.module('view-form').directive('submitFormDirective', ['$http', 'TimeCoun
var geoData = $.getJSON('https://freegeoip.net/json/').responseJSON;
$.ajaxSetup( { 'async': true } );
if(!geoData || !geoData.ip){
geoData = {
ip: 'Adblocker'
};
}
return {
ipAddr: geoData.ip,
geoLocation: {