mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Removed async from detectDishType
This commit is contained in:
parent
b272d3b32f
commit
aa362ba18b
1 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ class Dish {
|
||||||
* Detects the MIME type of the current dish
|
* Detects the MIME type of the current dish
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
async detectDishType() {
|
detectDishType() {
|
||||||
const data = new Uint8Array(this.value.slice(0, 2048)),
|
const data = new Uint8Array(this.value.slice(0, 2048)),
|
||||||
types = detectFileType(data);
|
types = detectFileType(data);
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ class Dish {
|
||||||
break;
|
break;
|
||||||
case Dish.ARRAY_BUFFER:
|
case Dish.ARRAY_BUFFER:
|
||||||
case Dish.BYTE_ARRAY:
|
case Dish.BYTE_ARRAY:
|
||||||
title = await this.detectDishType();
|
title = this.detectDishType();
|
||||||
if (title !== null) break;
|
if (title !== null) break;
|
||||||
// fall through if no mime type was detected
|
// fall through if no mime type was detected
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue