diff --git a/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts b/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts index fe63e66b3..82e17faf1 100644 --- a/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts +++ b/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.ts @@ -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; }