From 94773a1f11608065e3899524849ff867ac81e7a2 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 20 Aug 2019 17:56:35 +0800 Subject: [PATCH] check ifdef for bootstrap version --- Roo/bootstrap/version.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/version.js b/Roo/bootstrap/version.js index 7d4b3cb16c..555a5ab1a6 100644 --- a/Roo/bootstrap/version.js +++ b/Roo/bootstrap/version.js @@ -7,7 +7,7 @@ Roo.bootstrap.version = ( function() { var ret=3; Roo.each(document.styleSheets, function(s) { - if (s.href.match(/css-bootstrap4/)) { + if (typeof(s.href) != 'undefined' && s.href.match(/css-bootstrap4/)) { ret=4; } }); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index f155bf72c0..48a8ef58bb 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -7,7 +7,7 @@ Roo.bootstrap.version = ( function() { var ret=3; Roo.each(document.styleSheets, function(s) { - if (s.href.match(/css-bootstrap4/)) { + if (typeof(s.href) != 'undefined' && s.href.match(/css-bootstrap4/)) { ret=4; } }); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index d1d8833afe..df4a844ac5 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1,5 +1,5 @@ // Roo/bootstrap/version.js -Roo.bootstrap.version=(function(){var A=3;Roo.each(document.styleSheets,function(s){if(s.href.match(/css-bootstrap4/)){A=4;}});return A;})(); +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/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')); -- 2.39.2