From 97e04791817e7428e8164c91170367c51675e642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Sun, 7 Sep 2025 20:47:00 +0800 Subject: [PATCH] Try sorting the resources --- api.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api.js b/api.js index 40ea352..f06d200 100644 --- a/api.js +++ b/api.js @@ -83,15 +83,15 @@ BotanJS.prototype.compile = function( type ) return; } - var j = conf.debug ? [ "Components.Console" ] : []; - for( var i in this.sv ) if( this.sv[ i ] ) j.push( i ); - for( var i in this.kv ) if( this.kv[ i ] ) j.push( i ); + var resList = conf.debug ? [ "Components.Console" ] : []; + for( var i in this.sv ) if( this.sv[ i ] ) resList.push( i ); + for( var i in this.kv ) if( this.kv[ i ] ) resList.push( i ); var rainet = conf.rinet || conf.serviceUri; if( conf.type && "or".indexOf( conf.type ) != -1 ) { - this[ type ] = rainet + conf.type + type + "/" + j.join( "/" ); + this[ type ] = rainet + conf.type + type + "/" + resList.join( "/" ); this.emit( "complete" ); return; } @@ -102,7 +102,7 @@ BotanJS.prototype.compile = function( type ) }; - var q = j.join( "," ); + var q = resList.sort().join( "," ); var lookupKey = hash.md5( q ); var Session = cl.load( "botansx.modular.session" );