Skip to content

Commit 8e4ec7b

Browse files
arashsheydaantfu
andauthored
fix(assets): remove dot from file extension (#512)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
1 parent 6e37584 commit 8e4ec7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/devtools/src/server-rpc/assets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }: N
104104

105105
const { ext } = parse(finalPath)
106106
if (extensions !== '*') {
107-
if (!extensions.includes(ext.toLowerCase()))
107+
if (!extensions.includes(ext.toLowerCase().slice(1)))
108108
throw new Error(`File extension ${ext} is not allowed to upload, allowed extensions are: ${extensions.join(', ')}\nYou can configure it in Nuxt config at \`devtools.assets.uploadExtensions\`.`)
109109
}
110110

0 commit comments

Comments
 (0)