Fix null path exception when checking path
tsc compiles default parameter to have `path === void 0`, which doesn't catch the case of path is null.
This commit is contained in:
parent
bb01e08d44
commit
d0d44605a9
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Reference in a new issue