Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amorey committed Sep 22, 2024
1 parent 590e991 commit 5de4267
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shared/src/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('getTokenString', () => {
expect(tokenStr).toEqual('my-token');
});

it('gets token from custom field name', async() => {
it('gets token from custom field name', async () => {
const formData = new FormData();
formData.set('file', new Blob(['xxx']), 'filename');
formData.set('csrfToken', 'my-token');
Expand Down
2 changes: 1 addition & 1 deletion shared/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function getTokenString(request: Request, tokenOpts: TokenOptions =
const token = request.headers.get('x-csrf-token');
if (token !== null) return token;

const fieldName = tokenOpts.fieldName;
const { fieldName } = tokenOpts;

// check request body
const contentType = request.headers.get('content-type') || 'text/plain';
Expand Down

0 comments on commit 5de4267

Please sign in to comment.