Add null check when reading offerAutopilotSettings (#138)

This commit is contained in:
victor-meng
2020-08-10 09:55:43 -07:00
committed by GitHub
parent 95f1efc03f
commit e28765d740

View File

@@ -344,7 +344,7 @@ export default class SettingsTab extends TabsBase implements ViewModels.WaitsFor
if (!this.isAutoPilotSelected()) {
return false;
}
const originalAutoPilotSettings = this.collection.offer().content.offerAutopilotSettings;
const originalAutoPilotSettings = this.collection?.offer()?.content?.offerAutopilotSettings;
if (!originalAutoPilotSettings) {
return false;
}