Getting "AJS.MacroBrowser is undefined" error after upgrading confluence Server instance from 7.19.8 to 8.5.2

Hi Team ,

We have an inhouse built custom macro which was working fine before upgrading our confluence server instance (7.19.8) . Once we upgraded it to 8.5.2 , we started getting “TypeError: AJS.MacroBrowser is undefined” error .

In this plugin , we are using a hidden parameter to pass some values. but not as this AJS.Macrbrowser is throwing undefined error . The respective test field is not getting hidden.

Here is my web-resource config data from plugin.xml file …

 <web-resource key="myConfluenceMacro-resources" name="myConfluenceMacro Web Resources">
        <resource type="download" name="myConfluenceMacro.css" location="/css/myConfluenceMacro.css"/>
        <resource type="download" name="custom-editorup.js" location="/js/custom-editorup.js" /> <resource type="download" name="images/" location="/images"/>

Anyone else also faced it ? Please help to let us know if anyone found any workaround for this.

Thanks & Regards