mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-25 06:05:52 +02:00
Update to Angular 14
This commit is contained in:
@@ -173,7 +173,7 @@ export function saveCanvas(filePath: string, canvas: HTMLCanvasElement) {
|
||||
try {
|
||||
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
||||
} catch (e) {
|
||||
if (e.code !== 'EEXIST') throw e;
|
||||
if ((e as NodeJS.ErrnoException).code !== 'EEXIST') throw e;
|
||||
}
|
||||
|
||||
fs.writeFileSync(filePath, canvas.toBuffer());
|
||||
|
||||
Reference in New Issue
Block a user