From 58e5372073afdd077833f5956f7df40341378eda Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Thu, 28 Nov 2019 18:27:23 +0100 Subject: [PATCH] [ML] remove redundant check and fallback for calendars --- .../jobs/new_job/common/job_creator/job_creator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/legacy/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts b/x-pack/legacy/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts index 0da8ae4a39429..e11cebe0383cd 100644 --- a/x-pack/legacy/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts +++ b/x-pack/legacy/plugins/ml/public/application/jobs/new_job/common/job_creator/job_creator.ts @@ -194,7 +194,7 @@ export class JobCreator { } public get calendars(): Calendar[] { - return this._calendars || []; + return this._calendars; } public set calendars(calendars: Calendar[]) { @@ -368,7 +368,7 @@ export class JobCreator { * @private */ private async _updateCalendars() { - if (!this._calendars || this._calendars.length === 0) { + if (this._calendars.length === 0) { return; }