File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,11 @@ export class StarbasePluginRegistry {
7878 } ) : Promise < { sql : string ; params ?: unknown [ ] } > {
7979 let { sql, params } = opts
8080
81- if ( this . plugins ?. length ) {
82- await Promise . all (
83- this . plugins . map ( async ( plugin : StarbasePlugin ) => {
84- const { sql : _sql , params : _params } =
85- await plugin . beforeQuery ( opts )
86- sql = _sql
87- params = _params
88- } )
89- )
81+ for ( const plugin of this . plugins ) {
82+ const { sql : _sql , params : _params } =
83+ await plugin . beforeQuery ( opts )
84+ sql = _sql
85+ params = _params
9086 }
9187
9288 return {
@@ -104,15 +100,11 @@ export class StarbasePluginRegistry {
104100 } ) : Promise < any > {
105101 let { result } = opts
106102
107- if ( this . plugins ?. length ) {
108- await Promise . all (
109- this . plugins . map ( async ( plugin : StarbasePlugin ) => {
110- result = await plugin . afterQuery ( {
111- ...opts ,
112- result,
113- } )
114- } )
115- )
103+ for ( const plugin of this . plugins ) {
104+ result = await plugin . afterQuery ( {
105+ ...opts ,
106+ result,
107+ } )
116108 }
117109
118110 return result
You can’t perform that action at this time.
0 commit comments