mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-12 16:07:59 +00:00
fix newRtMsg() and newFavMsg() undefined sig_userpost error alert
This commit is contained in:
parent
1f535ab230
commit
5ee1b4e5ee
@ -285,11 +285,12 @@ function newRtMsg(postData, msg) {
|
||||
sig_userpost = postData.attr('data-content_to_sigrt');
|
||||
}
|
||||
|
||||
if (typeof sig_userpost === 'undefined') {
|
||||
alert(polyglot.t('error',
|
||||
{error: 'can\'t sig_userpost is not deifned'}
|
||||
));
|
||||
|
||||
if (!sig_userpost) {
|
||||
alertPopup({
|
||||
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
||||
txtMessage: 'Can\'t handle retwisting of a twist —\n'
|
||||
+ polyglot.t('this is undefined', {'this': 'sig_userpost'})
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -321,13 +322,15 @@ function newFavMsg(postData, priv, msg) {
|
||||
var userpost = $.evalJSON(postData.attr('data-content_to_rt'));
|
||||
var sig_userpost = postData.attr('data-content_to_sigrt');
|
||||
|
||||
if (typeof sig_userpost === 'undefined') {
|
||||
alert(polyglot.t('error',
|
||||
{error: 'can\'t sig_userpost is not deifned'}
|
||||
));
|
||||
|
||||
if (!sig_userpost) {
|
||||
alertPopup({
|
||||
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
||||
txtMessage: 'Can\'t handle favoriting of a twist —\n'
|
||||
+ polyglot.t('this is undefined', {'this': 'sig_userpost'})
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var rtObj = {sig_userpost: sig_userpost, userpost: userpost};
|
||||
|
||||
if (typeof lastPostId !== 'undefined') {
|
||||
|
Loading…
Reference in New Issue
Block a user