File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -223,23 +223,19 @@ export class Context {
223
223
) : Promise < T | undefined > ;
224
224
225
225
// Implementation
226
- get < T > (
226
+ async get < T > (
227
227
keyWithPath : string ,
228
228
optionsOrSession ?: ResolutionOptions | ResolutionSession ,
229
229
) : Promise < T | undefined > {
230
230
/* istanbul ignore if */
231
231
if ( debug . enabled ) {
232
232
debug ( 'Resolving binding: %s' , keyWithPath ) ;
233
233
}
234
- try {
235
- const valueOrPromiseLike = this . getValueOrPromise < T > (
236
- keyWithPath ,
237
- optionsOrSession ,
238
- ) ;
239
- return Promise . resolve < T | undefined > ( valueOrPromiseLike ) ;
240
- } catch ( err ) {
241
- return Promise . reject ( err ) ;
242
- }
234
+
235
+ return await this . getValueOrPromise < T | undefined > (
236
+ keyWithPath ,
237
+ optionsOrSession ,
238
+ ) ;
243
239
}
244
240
245
241
/**
You can’t perform that action at this time.
0 commit comments