mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #706 from BlipRanger/patch-4
Quick patch for overzealous checking
This commit is contained in:
@@ -1057,7 +1057,7 @@ app.post("/editcharacterattribute", jsonParser, async function (request, respons
|
||||
charaRead(avatarPath).then((char) => {
|
||||
char = JSON.parse(char);
|
||||
//check if the field exists
|
||||
if (char[request.body.field] === undefined || char.data[request.body.field] === undefined) {
|
||||
if (char[request.body.field] === undefined && char.data[request.body.field] === undefined) {
|
||||
console.error('Error: invalid field.');
|
||||
response.status(400).send('Error: invalid field.');
|
||||
return;
|
||||
|
Reference in New Issue
Block a user