Skip to content

Commit 5a59c63

Browse files
committed
drop Promise.resolve as async is not neccessary any more
1 parent 7c762ff commit 5a59c63

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/server/plugins/nunjucks/context.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function context(request) {
7272
/**
7373
* Returns the context for the devtool. Consumers won't have access to this.
7474
* @param {FormRequest | FormRequestPayload | null} _request
75-
* @returns {Promise<Record<string, unknown> & { assetPath: string, getDxtAssetPath: (asset: string) => string }>}
75+
* @returns {Record<string, unknown> & { assetPath: string, getDxtAssetPath: (asset: string) => string }}
7676
*/
7777
export function devtoolContext(_request) {
7878
const manifestPath = join(config.get('publicDir'), 'assets-manifest.json')
@@ -86,12 +86,12 @@ export function devtoolContext(_request) {
8686
}
8787
}
8888

89-
return Promise.resolve({
89+
return {
9090
assetPath: '/assets',
9191
getDxtAssetPath: (asset = '') => {
9292
return `/${webpackManifest?.[asset] ?? asset}`
9393
}
94-
})
94+
}
9595
}
9696

9797
/**

0 commit comments

Comments
 (0)