fix: empty file name fallback

This commit is contained in:
Denzel 2025-08-22 04:13:04 +02:00
parent ed8e12769e
commit b4a650c3c2
2 changed files with 2 additions and 2 deletions

View File

@ -239,7 +239,7 @@ class Files {
const url = URL.createObjectURL(blob);
const settings = JSON.parse(localStorage.getItem("settings") ?? "{}");
const filenameFormat = settings.filenameFormat ?? "VERT_%name%";
const filenameFormat = settings.filenameFormat || "VERT_%name%";
const format = (name: string) => {
const date = new Date().toISOString();

View File

@ -91,7 +91,7 @@ export class VertFile {
if (!to.startsWith(".")) to = `.${to}`;
const settings = JSON.parse(localStorage.getItem("settings") ?? "{}");
const filenameFormat = settings.filenameFormat ?? "VERT_%name%";
const filenameFormat = settings.filenameFormat || "VERT_%name%";
const format = (name: string) => {
const date = new Date().toISOString();