git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 3f9a16dc authored by mmn's avatar mmn

Merge from chimo: Catch GeoCookie JSON parsing error

parents 16774045 8be96a7e
......@@ -1177,18 +1177,22 @@ var SN = { // StatusNet
}
}
} else {
var cookieValue = JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));
form.find('[name=lat]').val(cookieValue.NLat);
form.find('[name=lon]').val(cookieValue.NLon);
form.find('[name=location_ns]').val(cookieValue.NLNS);
form.find('[name=location_id]').val(cookieValue.NLID);
form.find('[name=notice_data-geo]').prop('checked', cookieValue.NDG);
SN.U.NoticeGeoStatus(form, cookieValue.NLN, cookieValue.NLat, cookieValue.NLon, cookieValue.NLNU);
label
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')')
.addClass('checked');
try {
var cookieValue = JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));
form.find('[name=lat]').val(cookieValue.NLat);
form.find('[name=lon]').val(cookieValue.NLon);
form.find('[name=location_ns]').val(cookieValue.NLNS);
form.find('[name=location_id]').val(cookieValue.NLID);
form.find('[name=notice_data-geo]').prop('checked', cookieValue.NDG);
SN.U.NoticeGeoStatus(form, cookieValue.NLN, cookieValue.NLat, cookieValue.NLon, cookieValue.NLNU);
label
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')')
.addClass('checked');
} catch (e) {
console.log('Parsing error:', e);
}
}
} else {
removeNoticeDataGeo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment