Fix #5681 - fix bootstrap4 detection
[roojs1] / Roo / bootstrap / version.js
index 0ecc610..7d4b3cb 100644 (file)
@@ -1,8 +1,15 @@
+/**
+ * set the version of bootstrap based on the stylesheet...
+ *
+ */
+
 Roo.bootstrap.version = (
         function() {
                 var ret=3;
-                Roo.each(document.styleSheets[0], function(s) {
-                    if (s.href.match(/css-bootstrap4/)) ret=4;
-                }
-        ); return ret; }
-)();
\ No newline at end of file
+                Roo.each(document.styleSheets, function(s) {
+                    if (s.href.match(/css-bootstrap4/)) {
+                        ret=4;
+                    }
+                });
+        return ret;
+})(); 
\ No newline at end of file