Skip to content

Commit

Permalink
fix asset request blocking read (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman authored Jul 18, 2024
1 parent 7623dc9 commit a2b3c39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion expo-updates-server/pages/api/assets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs';
import fsPromises from 'fs/promises';
import mime from 'mime';
import { NextApiRequest, NextApiResponse } from 'next';
import nullthrows from 'nullthrows';
Expand Down Expand Up @@ -60,7 +61,7 @@ export default async function assetsEndpoint(req: NextApiRequest, res: NextApiRe
}

try {
const asset = fs.readFileSync(assetPath, null);
const asset = await fsPromises.readFile(assetPath, null);

res.statusCode = 200;
res.setHeader(
Expand Down

0 comments on commit a2b3c39

Please sign in to comment.