Macro javascript loading twice on mobile browser

We have noticed that javascript is loading as expected on a desktop browser but on mobile, it is getting executed twice. After investigation, we have found that two different versions of the files get loaded as per the below image. Is there any configuration changes needed to load file only once or is this confluence bug?