mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-29 14:56:36 +03:00
Add a try catch for killApp in render.
This commit is contained in:
parent
40ffea6ce9
commit
b4dc540cc2
@ -188,8 +188,10 @@ function runElmApp(
|
||||
app.ports.sendPageData.subscribe(portHandler);
|
||||
}).finally(() => {
|
||||
addDataSourceWatcher(patternsToWatch);
|
||||
killApp();
|
||||
killApp = null;
|
||||
try {
|
||||
killApp();
|
||||
killApp = null;
|
||||
} catch (error) {}
|
||||
});
|
||||
}
|
||||
/**
|
||||
@ -327,11 +329,11 @@ async function readFileJobNew(req, patternsToWatch) {
|
||||
patternsToWatch.add(filePath);
|
||||
|
||||
const fileContents = // TODO can I remove this hack?
|
||||
(
|
||||
await fsPromises.readFile(
|
||||
path.join(process.env.LAMBDA_TASK_ROOT || process.cwd(), filePath)
|
||||
)
|
||||
).toString();
|
||||
(
|
||||
await fsPromises.readFile(
|
||||
path.join(process.env.LAMBDA_TASK_ROOT || process.cwd(), filePath)
|
||||
)
|
||||
).toString();
|
||||
const parsedFile = matter(fileContents);
|
||||
|
||||
return jsonResponse(req, {
|
||||
|
Loading…
Reference in New Issue
Block a user