fix: thoát mã lỗi khi script nén ảnh gặp sự cố
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,12 @@ async function writeLqip(lqip) {
|
||||
console.log("Wrote " + path.relative(ROOT, LQIP_OUT) + " (" + Object.keys(lqip).length + " entries)");
|
||||
}
|
||||
|
||||
const lqip = await optimizePanoramas();
|
||||
await optimizeModals();
|
||||
await writeLqip(lqip);
|
||||
console.log("Done.");
|
||||
try {
|
||||
const lqip = await optimizePanoramas();
|
||||
await optimizeModals();
|
||||
await writeLqip(lqip);
|
||||
console.log("Done.");
|
||||
} catch (err) {
|
||||
console.error("optimize-images failed:", err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user