Renewed-Scripts/qb-phone

Email Accept errors

SpartanT101 opened this issue · 0 comments

Getting this error when hitting accept on emails

Cannot read properties of undefined (reading 'buttonEvent') (@qb-phone/html/js/mail.js:68)

this is the section it calls to

$(document).on('click', '.mail-accept', function(e){
    e.preventDefault();
    var mailId = $(this).parent().parent().parent().data('mailid');
    var MailData = $("#"+OpenedMail).data('MailData');
    $.post('https://qb-phone/AcceptMailButton', JSON.stringify({
        buttonEvent: MailData.button.buttonEvent,
        buttonData: MailData.button.buttonData,
        isServer: MailData.button.isServer,
        mailId: mailId,
    }));
});


specifically this line

buttonEvent: MailData.button.buttonEvent,

any ideas?