Catches GeoCookie JSON parsing error
This commit is contained in:
parent
75711ae06a
commit
8be96a7ebe
|
@ -1177,6 +1177,7 @@ var SN = { // StatusNet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
var cookieValue = JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));
|
var cookieValue = JSON.parse($.cookie(SN.C.S.NoticeDataGeoCookie));
|
||||||
|
|
||||||
form.find('[name=lat]').val(cookieValue.NLat);
|
form.find('[name=lat]').val(cookieValue.NLat);
|
||||||
|
@ -1189,6 +1190,9 @@ var SN = { // StatusNet
|
||||||
label
|
label
|
||||||
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')')
|
.attr('title', NoticeDataGeo_text.ShareDisable + ' (' + cookieValue.NLN + ')')
|
||||||
.addClass('checked');
|
.addClass('checked');
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Parsing error:', e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
removeNoticeDataGeo();
|
removeNoticeDataGeo();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user