mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 16:53:02 +00:00
Fix crash when applying blueprint
thanks bugsnag
This commit is contained in:
@@ -437,12 +437,15 @@ export default class Ship {
|
|||||||
m.blueprint = bp;
|
m.blueprint = bp;
|
||||||
this.clearModifications(m);
|
this.clearModifications(m);
|
||||||
// Set any hidden items for the blueprint now
|
// Set any hidden items for the blueprint now
|
||||||
const features = m.blueprint.grades[m.blueprint.grade].features;
|
if (m.blueprint.grades[m.blueprint.grade] && m.blueprint.grades[m.blueprint.grade].features) {
|
||||||
for (const featureName in features) {
|
const features = m.blueprint.grades[m.blueprint.grade].features;
|
||||||
if (Modifications.modifications[featureName].hidden) {
|
for (const featureName in features) {
|
||||||
this.setModification(m, featureName, bp.grades[bp.grade].features[featureName][0]);
|
if (Modifications.modifications[featureName].hidden) {
|
||||||
|
this.setModification(m, featureName, bp.grades[bp.grade].features[featureName][0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateModificationsString();
|
this.updateModificationsString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user