mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-07 14:17:51 +02:00
fix: fix content type for typescript
This commit is contained in:
@@ -209,7 +209,7 @@ export default class AnonymizedFile {
|
|||||||
const mime = lookup(this.anonymizedPath);
|
const mime = lookup(this.anonymizedPath);
|
||||||
if (mime && this.extension() != "ts") {
|
if (mime && this.extension() != "ts") {
|
||||||
res.contentType(mime);
|
res.contentType(mime);
|
||||||
} else if (this.extension() != "ts") {
|
} else if (this.extension() == "ts") {
|
||||||
res.contentType("application/x-typescript");
|
res.contentType("application/x-typescript");
|
||||||
} else if (isTextFile(this.anonymizedPath)) {
|
} else if (isTextFile(this.anonymizedPath)) {
|
||||||
res.contentType("text/plain");
|
res.contentType("text/plain");
|
||||||
|
|||||||
Reference in New Issue
Block a user