mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 18:48:09 +00:00
bugfix: Crash (#1381)
## Description: Resolve a crash caused by un-sanitized user inputs. Fixes #1380. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
@@ -143,7 +143,10 @@ export class ConstructionExecution implements Execution {
|
||||
this.mg.addExecution(new FactoryExecution(player, this.tile));
|
||||
break;
|
||||
default:
|
||||
throw Error(`unit type ${this.constructionType} not supported`);
|
||||
console.warn(
|
||||
`unit type ${this.constructionType} cannot be constructed`,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user