split javascript mime type into frontend and backend

This commit is contained in:
azivner
2018-03-05 22:08:45 -05:00
parent 61c2456cf6
commit b3209a9bbf
6 changed files with 9 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ class Note extends Entity {
isJavaScript() {
return (this.type === "code" || this.type === "file")
&& (this.mime === "application/javascript" || this.mime === "application/x-javascript");
&& (this.mime.startsWith("application/javascript") || this.mime === "application/x-javascript");
}
isHtml() {