mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Use JSON instead of json5
This commit is contained in:
@ -713,7 +713,7 @@ app.post("/getchat", jsonParser, function (request, response) {
|
||||
const lines = data.split('\n');
|
||||
|
||||
// Iterate through the array of strings and parse each line as JSON
|
||||
const jsonData = lines.map(tryParse).filter(x => x);
|
||||
const jsonData = lines.map((l) => { try { return JSON.parse(l); } catch (_) { }}).filter(x => x);
|
||||
return response.send(jsonData);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
Reference in New Issue
Block a user