You should remove this condition as well. Nothing wrong with setting this.periodInMinutes = undefined.