mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +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 {
|
function mimeTypeToType(mimeType: string): string {
|
||||||
let type: string = "Document";
|
let type: string = "Document";
|
||||||
|
|
||||||
if (mimeType.indexOf("image") === 0) {
|
if (mimeType) {
|
||||||
type = "Image";
|
if (mimeType.indexOf("image") === 0) {
|
||||||
} else if (mimeType.indexOf("javascript") !== -1 || mimeType.indexOf("json") !== -1) {
|
type = "Image";
|
||||||
type = "Script";
|
} else if (mimeType.indexOf("javascript") !== -1 || mimeType.indexOf("json") !== -1) {
|
||||||
|
type = "Script";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
|
Reference in New Issue
Block a user