@Vishwas R
I’m not able to reproduce ist on jsfiddle. It seems to be an issue in combination with a SharePoint environment.
If you provide a email I can invite you to a site where you can reproduce it.
I also made two screenshots for better understanding:
loaded scripts
console view
br, Alex