Skip to content

Commit

Permalink
feat: replaced >= check to == check
Browse files Browse the repository at this point in the history
  • Loading branch information
abhee11 committed Sep 30, 2022
1 parent a72a56f commit 2c4d709
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ export class ContainerDetector implements Detector {
.find(s => s.includes(this.HOSTNAME));
const containerIdStr = str
?.split('/')
.find(s => s.length >= this.CONTAINER_ID_LENGTH);
return containerIdStr?.substring(
containerIdStr.length - this.CONTAINER_ID_LENGTH
);
.find(s => s.length === this.CONTAINER_ID_LENGTH);
return containerIdStr || '';
}

/*
Expand Down

0 comments on commit 2c4d709

Please sign in to comment.