fix check for stylesheet href
authorAlan Knowles <alan@roojs.com>
Tue, 20 Aug 2019 09:57:15 +0000 (17:57 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 20 Aug 2019 09:57:15 +0000 (17:57 +0800)
Roo/bootstrap/version.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 555a5ab..aac1570 100644 (file)
@@ -7,7 +7,7 @@ Roo.bootstrap.version = (
         function() {
                 var ret=3;
                 Roo.each(document.styleSheets, function(s) {
-                    if (typeof(s.href) != 'undefined' && s.href.match(/css-bootstrap4/)) {
+                    if ( s.href  && s.href.match(/css-bootstrap4/)) {
                         ret=4;
                     }
                 });
index 48a8ef5..c28bd99 100644 (file)
@@ -7,7 +7,7 @@ Roo.bootstrap.version = (
         function() {
                 var ret=3;
                 Roo.each(document.styleSheets, function(s) {
-                    if (typeof(s.href) != 'undefined' && s.href.match(/css-bootstrap4/)) {
+                    if ( s.href  && s.href.match(/css-bootstrap4/)) {
                         ret=4;
                     }
                 });
index df4a844..6b185b6 100644 (file)
@@ -1,5 +1,5 @@
 // Roo/bootstrap/version.js
-Roo.bootstrap.version=(function(){var A=3;Roo.each(document.styleSheets,function(s){if(typeof(s.href)!='undefined'&&s.href.match(/css-bootstrap4/)){A=4;}});return A;})();
+Roo.bootstrap.version=(function(){var A=3;Roo.each(document.styleSheets,function(s){if(s.href&&s.href.match(/css-bootstrap4/)){A=4;}});return A;})();
 // Roo/bootstrap/Component.js
 Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);this.addEvents({"childrenrendered":true});};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{allowDomMove:false,cls:false,style:false,autoCreate:false,tooltip:null,initEvents:function(){}
 ,xattr:false,parentId:false,can_build_overlaid:true,container_method:false,dataId:false,name:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.el.attr('xtype')){this.el.attr('xtypex',this.el.attr('xtype'));