mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Ensure that stock builds are saved with a code; ignore builds without codes in comparisons
This commit is contained in:
@@ -308,7 +308,10 @@ export default class OutfittingPage extends Page {
|
||||
* Save the current build
|
||||
*/
|
||||
_saveBuild() {
|
||||
const { code, buildName, newBuildName, shipId } = this.state;
|
||||
const { ship, buildName, newBuildName, shipId } = this.state;
|
||||
|
||||
// If this is a stock ship the code won't be set, so ensure that we have it
|
||||
const code = this.state.code || ship.toString();
|
||||
|
||||
Persist.saveBuild(shipId, newBuildName, code);
|
||||
this._updateRoute(shipId, newBuildName, code);
|
||||
|
||||
Reference in New Issue
Block a user