Skip to content

Commit

Permalink
don't force an empty baseUrl to be '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Aug 25, 2012
1 parent 205bdb5 commit 5c2c243
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/JBrowse/ConfigAdaptor/JB_json_v1.js
Expand Up @@ -30,9 +30,11 @@ return declare('JBrowse.ConfigAdaptor.JB_json_v1',null,
url: Util.resolveUrl( args.baseUrl || window.location.href, args.config.url ),
handleAs: 'text',
load: function( o ) {
window.setTimeout( dojo.hitch(this, function() {
o = that.parse_conf( o, args );
o = that.regularize_conf( o, args );
args.onSuccess.call( args.context || this, o );
}, 10 ));
},
error: function( i ) {
console.error( ''+i );
Expand Down Expand Up @@ -70,7 +72,7 @@ return declare('JBrowse.ConfigAdaptor.JB_json_v1',null,
regularize_conf: function( o, load_args ) {
o.sourceUrl = o.sourceUrl || load_args.config.url;
o.baseUrl = o.baseUrl || Util.resolveUrl( o.sourceUrl, '.' );
if( ! /\/$/.test( o.baseUrl ) )
if( o.baseUrl.length && ! /\/$/.test( o.baseUrl ) )
o.baseUrl += "/";

return this._evalHooks( o );
Expand Down

0 comments on commit 5c2c243

Please sign in to comment.