fit-ui 2.18.1 → 2.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Fit.UI.js CHANGED
@@ -682,7 +682,7 @@ Fit._internal =
682
682
  {
683
683
  Core:
684
684
  {
685
- VersionInfo: { Major: 2, Minor: 18, Patch: 1 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
685
+ VersionInfo: { Major: 2, Minor: 18, Patch: 2 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
686
686
  }
687
687
  };
688
688
 
@@ -712,7 +712,11 @@ Fit._internal.Core.EnsureStyles = function()
712
712
  {
713
713
  // Find Base URL - e.g. http://server.com/libs/fitui
714
714
 
715
- var src = document.scripts[document.scripts.length - 1].src;
715
+ // Trying to aquire Fit.UI script by ID first, as this is most reliable. Obtaining the last script from the
716
+ // scripts collection is less reliable as some browser extensions manipulate the collection while scripts are loading.
717
+ var script = document.querySelector("script#FitUI") || document.querySelector("script#fitui") || document.scripts[document.scripts.length - 1];
718
+
719
+ var src = script && script.src || null;
716
720
 
717
721
  if (!src)
718
722
  {