Merge pull request #3271 from KeyboardNerd/bug/null-path
Fix null path exception when checking path
This commit is contained in:
commit
14e14eb359
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ export class DockerfilePathSelectComponent implements OnChanges {
|
||||||
this.isUnknownPath = false;
|
this.isUnknownPath = false;
|
||||||
var isValidPath: boolean = false;
|
var isValidPath: boolean = false;
|
||||||
|
|
||||||
if (path.length > 0 && path[0] === '/') {
|
if (path != null && path.length > 0 && path[0] === '/') {
|
||||||
isValidPath = true;
|
isValidPath = true;
|
||||||
this.isUnknownPath = supportsFullListing && paths.indexOf(path) < 0;
|
this.isUnknownPath = supportsFullListing && paths.indexOf(path) < 0;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue