We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c9496f commit 78a85deCopy full SHA for 78a85de
packages/context/src/context.ts
@@ -250,23 +250,19 @@ export class Context {
250
): Promise<T | undefined>;
251
252
// Implementation
253
- get<T>(
+ async get<T>(
254
keyWithPath: string,
255
optionsOrSession?: ResolutionOptions | ResolutionSession,
256
): Promise<T | undefined> {
257
/* istanbul ignore if */
258
if (debug.enabled) {
259
debug('Resolving binding: %s', keyWithPath);
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
- }
+
+ return await this.getValueOrPromise<T | undefined>(
+ keyWithPath,
+ optionsOrSession,
+ );
270
271
272
/**
0 commit comments