Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/domains/models/SpecificationFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export async function fileExists(name: string): Promise<boolean> {
return true;
}

const extension = name.split('.')[1];
const extension = name.includes('.') ? name.split('.').pop() : '';

const allowedExtenstion = ['yml', 'yaml', 'json'];

Expand Down
2 changes: 1 addition & 1 deletion src/domains/services/validation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const convertGitHubWebUrl = (url: string): string => {

// Handle GitHub web URLs like: https://github.com/owner/repo/blob/branch/path
// eslint-disable-next-line no-useless-escape
const githubWebPattern = /^https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([^\/]+)\/(.+)$/;
const githubWebPattern = /^https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/(.+)\/(.+)$/;
const match = urlWithoutFragment.match(githubWebPattern);

if (match) {
Expand Down
Loading