From d713f8838843d557f5901f801acbc6fcbf31a025 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 1 Sep 2015 17:18:08 +0100 Subject: Fix location bug fetching category extras. On a form, except one where you skipped the map, the category change call would use the initial map centre, rather than the map pin location. --- web/js/fixmystreet.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'web/js') diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js index 78372d68c..7d8c940d9 100644 --- a/web/js/fixmystreet.js +++ b/web/js/fixmystreet.js @@ -177,13 +177,8 @@ $(function(){ category: $(this).val() }; - if ( typeof fixmystreet !== 'undefined' ) { - args.latitude = fixmystreet.latitude; - args.longitude = fixmystreet.longitude; - } else { - args.latitude = $('input[name="latitude"]').val(); - args.longitude = $('input[name="longitude"]').val(); - } + args.latitude = $('input[name="latitude"]').val(); + args.longitude = $('input[name="longitude"]').val(); $.getJSON('/report/new/category_extras', args, function(data) { var $category_meta = $('#category_meta'); -- cgit v1.2.3