Skip to content

Commit

Permalink
fix: pass additional parameters as args to the generate fn
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo committed Jan 14, 2022
1 parent 0411f59 commit 053da5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function createImageApi (config: Config) {
})
},
async resolveImage (filename: string, params: Record<string, any>): Promise<undefined | string | ImageAttrs[]> {
const { [config.urlParam]: presetName, src, srcset, otherParams } = params
const { [config.urlParam]: presetName, src, srcset, ...otherParams } = params
const preset = config.presets[presetName]

debug.load('%O %s', params, filename)
Expand Down

0 comments on commit 053da5d

Please sign in to comment.