File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,8 +280,8 @@ export class Http {
280280
281281 this . events [ methodName ] . call ( this . events , ( req : any , subscribe : any ) => {
282282 this . plugins . runEvent ( method , [ req , subscribe ] ) ;
283- if ( method === 'postRequest' || method === 'postRequestError' ) {
284- this . plugins . cleanOptions ( ) ;
283+ if ( method === 'postRequest' ) {
284+ this . plugins . cleanOptions ( method ) ;
285285 }
286286 } ) ;
287287 }
Original file line number Diff line number Diff line change @@ -116,13 +116,15 @@ export class Plugins {
116116 }
117117 }
118118
119- cleanOptions ( ) {
119+ cleanOptions ( event : string ) {
120120 this . forEach ( ( plugin : Plugin ) => {
121121 if ( 'restoreOptions' in plugin ) {
122- plugin . restoreOptions ( ) ;
122+ if ( event && event in plugin ) {
123+ plugin . restoreOptions ( ) ;
124+ }
123125 }
126+ this . options [ plugin . getName ( ) ] = { } ;
124127 } ) ;
125- this . options = { } ;
126128 }
127129
128130 setOptions ( options : Object ) : this {
You can’t perform that action at this time.
0 commit comments