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:
@@ -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({
|
||||
|
2
ifm.php
2
ifm.php
@@ -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({
|
||||
|
@@ -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({
|
||||
|
Reference in New Issue
Block a user