Merge from chimo: Catch GeoCookie JSON parsing error

This commit is contained in:
Mikael Nordfeldth 2014-06-05 09:33:30 +02:00
commit 3f9a16dc58

View File

@ -1177,6 +1177,7 @@ var SN = { // StatusNet
}
}
} else {
try {
var cookieValue = JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));
form.find('[name=lat]').val(cookieValue.NLat);
@ -1189,6 +1190,9 @@ var SN = { // StatusNet
label
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')')
.addClass('checked');
} catch (e) {
console.log('Parsing error:', e);
}
}
} else {
removeNoticeDataGeo();