Skip to content

Commit

Permalink
fix: panic while exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotuna committed Jul 24, 2023
1 parent 438996e commit c882f6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ func GetExtension(fileName string, contentType string) (string, error) {
return "", fmt.Errorf("error getting extension from content type: %v", err)
}

// Ensure that the extesion exists
// Ensure that the extension exists
if len(metaExtension) == 0 {
ext = metaExtension[0]
} else {
ext = ".html"
return "", fmt.Errorf("could not determine extension from content type: %s", contentType)
}

ext = metaExtension[0]

if ext == ".htm" {
ext = ".html"
}
Expand Down

0 comments on commit c882f6b

Please sign in to comment.