Skip to content

Commit

Permalink
Fix #66 Remove extraneous conditional check
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Feb 11, 2020
1 parent 7c7afc4 commit 63b0415
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/dockerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ export class Dockerfile extends ImageTemplate implements ast.Dockerfile {
}

public getEscapeCharacter(): string {
if (this.directives.length > 0) {
for (const directive of this.directives) {
if (directive.getDirective() === ast.Directive.escape) {
const value = directive.getValue();
if (value === '\\' || value === '`') {
return value;
}
for (const directive of this.directives) {
if (directive.getDirective() === ast.Directive.escape) {
const value = directive.getValue();
if (value === '\\' || value === '`') {
return value;
}
}
}
Expand Down

0 comments on commit 63b0415

Please sign in to comment.