Add await

This commit is contained in:
Bill 2022-02-03 12:19:35 -05:00
parent 205db3e695
commit a327d23576

View File

@ -3,11 +3,11 @@ import { UncompressSWF } from './UncompressSWF';
export const ReadSWF = async (buffer: Buffer) =>
{
if(Buffer.isBuffer(buffer)) return UncompressSWF(buffer);
if(Buffer.isBuffer(buffer)) return await UncompressSWF(buffer);
buffer = await readFile(buffer);
if(!buffer) return null;
return UncompressSWF(buffer);
return await UncompressSWF(buffer);
};