Skip to content

Commit 84f3f28

Browse files
fix client options validation (#62)
1 parent 582f17a commit 84f3f28

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/modules/avatax-factory/loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export default async function avataxFactoryLoader({
1919
);
2020
}
2121

22-
if (!(options?.client && typeof options.client === "object")) {
23-
throw new Error("AvaTax client options must be provided");
22+
if (!(options && typeof options === "object")) {
23+
throw new Error("AvaTax options must be provided");
2424
}
2525

2626
if (!AvataxOptionsValidator.validateOptions(options)) {

src/services/avatax-options-validator.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ export class AvataxOptionsValidator {
4949
throw new Error("AvaTax plugin options must be provided as an object");
5050
}
5151

52-
if (!options.client) {
53-
throw new Error("AvaTax client configuration is required");
54-
}
55-
5652
this.validateRequiredField("accountId", options, "number");
5753
this.validateRequiredField("licenseKey", options, "string");
5854
this.validateRequiredField("companyId", options, "number");

0 commit comments

Comments
 (0)