From 49c04eb7af6a9259dc0159c9d84d72a51f0d3fff Mon Sep 17 00:00:00 2001 From: alecmerdler Date: Thu, 6 Apr 2017 15:25:52 -0700 Subject: [PATCH] initialize path and context component members to avoid null exception --- .../context-path-select.component.ts | 2 +- .../dockerfile-path-select.component.html | 3 +- .../dockerfile-path-select.component.ts | 2 +- .../manage-trigger-githost.component.html | 76 +++++++++---------- 4 files changed, 41 insertions(+), 42 deletions(-) diff --git a/static/js/directives/ui/context-path-select/context-path-select.component.ts b/static/js/directives/ui/context-path-select/context-path-select.component.ts index 7f7fb5297..bfd635c71 100644 --- a/static/js/directives/ui/context-path-select/context-path-select.component.ts +++ b/static/js/directives/ui/context-path-select/context-path-select.component.ts @@ -11,7 +11,7 @@ import { Input, Component, OnChanges, SimpleChanges } from 'ng-metadata/core'; export class ContextPathSelectComponent implements OnChanges { // FIXME: Use one-way data binding - @Input('=') public currentContext: string; + @Input('=') public currentContext: string = ''; @Input('=') public isValidContext: boolean; @Input('=') public contexts: string[]; private isUnknownContext: boolean = true; diff --git a/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.html b/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.html index ef20c83c7..8e0dc7605 100644 --- a/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.html +++ b/static/js/directives/ui/dockerfile-path-select/dockerfile-path-select.component.html @@ -1,5 +1,6 @@
-