1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-11 10:34:00 +02:00

Fixed javascript error when the mime_type of an item is not a string

This commit is contained in:
Marco Dickert
2018-03-26 10:37:39 +02:00
parent 1ec37792a0
commit 3117a15790
3 changed files with 18 additions and 12 deletions

View File

@@ -1572,11 +1572,13 @@ function IFM( params ) {
} else if(
self.config.edit &&
(
typeof item.mime_type === "string" && (
item.mime_type.substr( 0, 4 ) == "text"
|| item.mime_type == "inode/x-empty"
|| item.mime_type.indexOf( "xml" ) != -1
|| item.mime_type.indexOf( "json" ) != -1
)
)
) {
item.eaction = "edit";
item.button.push({

View File

@@ -1572,11 +1572,13 @@ function IFM( params ) {
} else if(
self.config.edit &&
(
typeof item.mime_type === "string" && (
item.mime_type.substr( 0, 4 ) == "text"
|| item.mime_type == "inode/x-empty"
|| item.mime_type.indexOf( "xml" ) != -1
|| item.mime_type.indexOf( "json" ) != -1
)
)
) {
item.eaction = "edit";
item.button.push({

View File

@@ -148,11 +148,13 @@ function IFM( params ) {
} else if(
self.config.edit &&
(
typeof item.mime_type === "string" && (
item.mime_type.substr( 0, 4 ) == "text"
|| item.mime_type == "inode/x-empty"
|| item.mime_type.indexOf( "xml" ) != -1
|| item.mime_type.indexOf( "json" ) != -1
)
)
) {
item.eaction = "edit";
item.button.push({