mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #3867 from NativeScript/pete/fix-mime-type-network-agent
Android Network Agent fix
This commit is contained in:
@ -166,10 +166,12 @@ export namespace NetworkAgent {
|
||||
function mimeTypeToType(mimeType: string): string {
|
||||
let type: string = "Document";
|
||||
|
||||
if (mimeType.indexOf("image") === 0) {
|
||||
type = "Image";
|
||||
} else if (mimeType.indexOf("javascript") !== -1 || mimeType.indexOf("json") !== -1) {
|
||||
type = "Script";
|
||||
if (mimeType) {
|
||||
if (mimeType.indexOf("image") === 0) {
|
||||
type = "Image";
|
||||
} else if (mimeType.indexOf("javascript") !== -1 || mimeType.indexOf("json") !== -1) {
|
||||
type = "Script";
|
||||
}
|
||||
}
|
||||
|
||||
return type;
|
||||
|
Reference in New Issue
Block a user