1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Get rid of readFileSync

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-12-01 16:40:10 +02:00
parent b8ca4add53
commit 3c041a9a84

View File

@ -189,7 +189,7 @@ export class Extensions extends React.Component {
.filter(req => !req.data && req.filePath)
.map(async request => {
try {
const data = fse.readFileSync(request.filePath);
const data = await fse.readFile(request.filePath);
request.data = data;
preloadedRequests.push(request);
return request;
@ -197,7 +197,7 @@ export class Extensions extends React.Component {
if (showError) {
Notifications.error(`Error while reading "${request.filePath}": ${String(error)}`);
}
};
}
})
);