X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fpages%2Fbuild%2Fsettings%2Fproject-select-dropdown.component.ts;h=996fa0d794a60617a5de5456ea18ed31195b6962;hb=refs%2Fchanges%2F15%2F16915%2F1;hp=a83ec0a6afefb0584c3706fad715a6ef4565d8c9;hpb=4d843d2bde236ec23810d0904dfb8aebbc53a37b;p=src%2Fxds%2Fxds-agent.git diff --git a/webapp/src/app/pages/build/settings/project-select-dropdown.component.ts b/webapp/src/app/pages/build/settings/project-select-dropdown.component.ts index a83ec0a..996fa0d 100644 --- a/webapp/src/app/pages/build/settings/project-select-dropdown.component.ts +++ b/webapp/src/app/pages/build/settings/project-select-dropdown.component.ts @@ -1,3 +1,21 @@ +/** +* @license +* Copyright (C) 2017-2018 "IoT.bzh" +* Author Sebastien Douheret +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + import { Component, OnInit, Input } from '@angular/core'; import { Observable } from 'rxjs/Observable'; @@ -28,7 +46,9 @@ export class ProjectSelectDropdownComponent implements OnInit { } select() { - this.projectSvr.setCurrentById(this.curPrj.id); + if (this.curPrj) { + this.projectSvr.setCurrentById(this.curPrj.id); + } } }