File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -649,8 +649,8 @@ Mana.prototype.send = function send(args) {
649
649
// Now that all modifications are complete we can finally assign the callback
650
650
// to `assign` instance so it can generate the correct request id.
651
651
//
652
- var cbId = options . json ? ':' + JSON . stringify ( options . json ) : '' ;
653
- var allCb = this . all ( args . str + cbId ) ;
652
+ var key = args . str + ( options . json ? ':' + JSON . stringify ( options . json ) : '' ) ;
653
+ var allCb = this . all ( key ) ;
654
654
655
655
if ( assign . fn ) {
656
656
// A callback already exists.
@@ -670,12 +670,10 @@ Mana.prototype.send = function send(args) {
670
670
// reduce requests on the actual API.
671
671
//
672
672
if ( args . fn ) {
673
- if ( options . method === 'GET' && this . fetching ( args . str ) ) {
674
- return this . push ( args . str , args . fn , assign ) ;
675
- } else if ( options . json ) {
676
- this . push ( args . str + ':' + JSON . stringify ( options . json ) , args . fn ) ;
673
+ if ( options . method === 'GET' && this . fetching ( key ) ) {
674
+ return this . push ( key , args . fn , assign ) ;
677
675
} else {
678
- this . push ( args . str , args . fn ) ;
676
+ this . push ( key , args . fn ) ;
679
677
}
680
678
}
681
679
You can’t perform that action at this time.
0 commit comments