gatsby-uc / gatsby-uc/plugins

bug(gatsby-source-airtable): Duplicate Dot in File Extension

Open
#455 4 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
57
Forks
37
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

When creating a RemoteFileNode, there seems to be an issue with the file extension having a duplicate dot. This is due to the way the extension is being appended in the code.

The code:

```js
ext: extension ? `.${extension}` : undefined,
```

results in a double dot before the file extension, e.g., ..jpg, since the extension variable already contains a dot.

## Expected behavior

The file extension should only have one dot before it, e.g., .jpg.

## Solution:
To fix this, the dot before extension in the template literal can be removed:

`ext: extension || undefined`

Here is the code line: https://github.com/gatsby-uc/plugins/blob/b7b48b781885a7b0378bb44f18ee18b0733a3981/packages/gatsby-source-airtable/gatsby-node.js#L309

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.