mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-06 10:54:07 +08:00
update files
This commit is contained in:
parent
a4a86ee958
commit
c1893b1e38
@ -27,7 +27,9 @@ function DecodeGenerator(){
|
|||||||
charset = jschardet.detect(data).encoding;
|
charset = jschardet.detect(data).encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
return charset ? iconv.decode(data, charset) : data.toString();
|
return charset && iconv.encodingExists(charset)
|
||||||
|
? iconv.decode(data, charset)
|
||||||
|
: data.toString();
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user