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 @@ -250,23 +250,19 @@ export class Context {
250
250
) : Promise < T | undefined > ;
251
251
252
252
// Implementation
253
- get < T > (
253
+ async get < T > (
254
254
keyWithPath : string ,
255
255
optionsOrSession ?: ResolutionOptions | ResolutionSession ,
256
256
) : Promise < T | undefined > {
257
257
/* istanbul ignore if */
258
258
if ( debug . enabled ) {
259
259
debug ( 'Resolving binding: %s' , keyWithPath ) ;
260
260
}
261
- try {
262
- const valueOrPromiseLike = this . getValueOrPromise < T > (
263
- keyWithPath ,
264
- optionsOrSession ,
265
- ) ;
266
- return Promise . resolve < T | undefined > ( valueOrPromiseLike ) ;
267
- } catch ( err ) {
268
- return Promise . reject ( err ) ;
269
- }
261
+
262
+ return await this . getValueOrPromise < T | undefined > (
263
+ keyWithPath ,
264
+ optionsOrSession ,
265
+ ) ;
270
266
}
271
267
272
268
/**
You can’t perform that action at this time.
0 commit comments