From 0217ef34ea35c0e76b5a7a1d95c39d8e7d8756ed Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 10 Nov 2017 13:29:55 -0500 Subject: [PATCH] Trim Dockerfile commands to fix UI Docker is (for some reason) adding an extra space, so trim the command before parsing Fixes https://jira.prod.coreos.systems/browse/QS-57 --- .../ui/dockerfile-command/dockerfile-command.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/js/directives/ui/dockerfile-command/dockerfile-command.component.ts b/static/js/directives/ui/dockerfile-command/dockerfile-command.component.ts index 5a77f60d0..d4a335655 100644 --- a/static/js/directives/ui/dockerfile-command/dockerfile-command.component.ts +++ b/static/js/directives/ui/dockerfile-command/dockerfile-command.component.ts @@ -33,6 +33,7 @@ export class DockerfileCommandComponent { } private getCommandKind(command: string): string { + command = command.trim(); if (!command) { return ''; } var space = command.indexOf(' '); @@ -40,6 +41,7 @@ export class DockerfileCommandComponent { } private getCommandTitleHtml(command: string): string { + command = command.trim(); if (!command) { return ''; } var kindHandlers = {