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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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