Browse Source

add check to newRtMsg() to avoid undefined sig_userpost

master
Simon Grim 9 years ago
parent
commit
5da5cde79a
  1. 8
      js/twister_actions.js

8
js/twister_actions.js

@ -285,6 +285,14 @@ function newRtMsg(postData, msg) {
sig_userpost = postData.attr('data-content_to_sigrt'); 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'}
));
return;
}
var rtObj = {sig_userpost: sig_userpost, userpost: userpost}; var rtObj = {sig_userpost: sig_userpost, userpost: userpost};
if (typeof lastPostId !== 'undefined') { if (typeof lastPostId !== 'undefined') {

Loading…
Cancel
Save