From ff1680378c4a8db762629b4f56a12f999e5d889b Mon Sep 17 00:00:00 2001 From: Jay Morrow Date: Tue, 20 Jun 2023 10:41:21 -0500 Subject: [PATCH 1/2] using all passed options --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 092217b..805ffd7 100644 --- a/index.ts +++ b/index.ts @@ -39,9 +39,9 @@ export class ChromeWebstoreAPI { if (!options[field]) { throw new Error(errorMap[field]) } - - this.options[field] = options[field] } + + this.options = options } get uploadEndpoint() { From 2389254fa13d36d856064e8778b7aedf58d161a2 Mon Sep 17 00:00:00 2001 From: Jay Morrow Date: Wed, 21 Jun 2023 08:39:23 -0500 Subject: [PATCH 2/2] use spread operator --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 805ffd7..bc64ec9 100644 --- a/index.ts +++ b/index.ts @@ -41,7 +41,7 @@ export class ChromeWebstoreAPI { } } - this.options = options + this.options = { ...options } } get uploadEndpoint() {