From 1183afc58215fd8b207bec405a2aca7f260857b8 Mon Sep 17 00:00:00 2001 From: DenisaCG Date: Fri, 5 Jul 2024 13:01:03 +0200 Subject: [PATCH] fix formatting root error --- src/s3contents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s3contents.ts b/src/s3contents.ts index 9efc105..9f76579 100644 --- a/src/s3contents.ts +++ b/src/s3contents.ts @@ -60,7 +60,7 @@ export class Drive implements Contents.IDrive { this._region = region!; }); } - this.formatRoot(root).then((root: string) => { + this.formatRoot(root ?? '').then((root: string) => { this._root = root; }); this._registeredFileTypes = {}; @@ -127,7 +127,7 @@ export class Drive implements Contents.IDrive { * The Drive root setter */ set root(root: string) { - this.formatRoot(root).then(root => (this._root = root)); + this.formatRoot(root ?? '').then(root => (this._root = root)); } /**