fix: resolve state_unsafe_mutation in getChatVar() (#707)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?
# Description
While investigating an issue where `{{getvar::A}}` didn't work properly
in background embedding, I encountered a `state_unsafe_mutation` error.
It appears that modifying the null check operator on the relevant line
can resolve this issue. Thank for your time.
This commit is contained in:
@@ -277,6 +277,7 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter
|
||||
for(const m of meta){
|
||||
if(m.startsWith('order ')){
|
||||
order = parseInt(m.substring(6))
|
||||
orderChanged = true
|
||||
}
|
||||
else{
|
||||
actions.push(m)
|
||||
|
||||
Reference in New Issue
Block a user