Merge pull request #3271 from KeyboardNerd/bug/null-path

Fix null path exception when checking path
This commit is contained in:
Sida Chen 2018-10-23 16:39:50 -04:00 committed by GitHub
commit 14e14eb359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ export class DockerfilePathSelectComponent implements OnChanges {
this.isUnknownPath = false;
var isValidPath: boolean = false;
if (path.length > 0 && path[0] === '/') {
if (path != null && path.length > 0 && path[0] === '/') {
isValidPath = true;
this.isUnknownPath = supportsFullListing && paths.indexOf(path) < 0;
}