Messages showing on Page Title from Popup

Hi All,
I did some research into this topic on here but still haven’t been able to solve this problem. We would conditionally show an error warning message on the page if there are fields missing from a snippet we run when we click send and it validates. This worked pre-Bonzai and we were able to generate warnings and stop and hide the popup so the user could go back and fix, or conditionally show a success message. I have been trying to address this and it seems to display messages conditionally on the pop up perfectly fine. Its only when we try to show these messages on the page (not the pop up) that we do not see them. The code Im using from the popup to show the messages on the page is here, this code is the same across the board so I just used one of the snippets. I verified that all of the names are correct and everything else.

 var pageTitle = $(’#pageTitleBB’);                           
 var editor =‘object’).editor;
             if (window.result[0] !== ‘’){
                            message: window.result[0],
                            severity: ‘WARNING’