Skip to content

Commit

Permalink
?! can appear randomly in script
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresmile committed Jun 5, 2024
1 parent e446a94 commit cb9ba98
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/db/src/Component/Script.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1433,14 +1433,16 @@ export function parseScript(region: Region, script: string): ScriptInfo {
break;
case questionMark:
if (line[1] === exclamationMark) {
choices.push({ ...choice });
components.push({
content: {
type: ScriptComponentType.CHOICES,
choices,
},
lineNumber: index,
});
if (choice.option.length > 0) {
choices.push({ ...choice });
components.push({
content: {
type: ScriptComponentType.CHOICES,
choices,
},
lineNumber: index,
});
}
resetChoiceVariables();
choices = [];
parserState.choice = false;
Expand Down

0 comments on commit cb9ba98

Please sign in to comment.