fix(DockerContainer): Fix getContainerById to return undefined for non-existent containers
This commit is contained in:
@@ -164,8 +164,9 @@ export class DockerHost {
|
||||
|
||||
/**
|
||||
* Gets a container by ID
|
||||
* Returns undefined if container does not exist
|
||||
*/
|
||||
public async getContainerById(containerId: string) {
|
||||
public async getContainerById(containerId: string): Promise<DockerContainer | undefined> {
|
||||
return await DockerContainer._fromId(this, containerId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user