mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
Ignore errors in getContentOfType
This commit is contained in:
parent
5001187b3c
commit
d7a37298ab
@ -232,6 +232,7 @@ function getContentOfType(type, format) {
|
|||||||
if (!item.folder) {
|
if (!item.folder) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
const filePath = path.join(item.folder, item.filename);
|
const filePath = path.join(item.folder, item.filename);
|
||||||
const fileContent = fs.readFileSync(filePath);
|
const fileContent = fs.readFileSync(filePath);
|
||||||
switch (format) {
|
switch (format) {
|
||||||
@ -245,6 +246,9 @@ function getContentOfType(type, format) {
|
|||||||
files.push(fileContent);
|
files.push(fileContent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
// Ignore errors
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user