Skip to content

Commit 3f8b7e7

Browse files
committed
update
1 parent c30d32e commit 3f8b7e7

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/schema/validator.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ function validateVariants(variants: any) {
7373
}
7474

7575
for (const variant of variants) {
76-
if (typeof variant !== "object") {
77-
throw new TypeError("Variant must be an object.");
78-
}
7976
if (typeof variant.name !== "string") {
8077
throw new TypeError("Variant name must be a string.");
8178
}
@@ -121,9 +118,6 @@ function validateUserVariantAllocation(UserAllocations: any) {
121118
}
122119

123120
for (const allocation of UserAllocations) {
124-
if (typeof allocation !== "object") {
125-
throw new TypeError("User allocation must be an object.");
126-
}
127121
if (typeof allocation.variant !== "string") {
128122
throw new TypeError("User allocation variant must be a string.");
129123
}
@@ -144,9 +138,6 @@ function validateGroupVariantAllocation(groupAllocations: any) {
144138
}
145139

146140
for (const allocation of groupAllocations) {
147-
if (typeof allocation !== "object") {
148-
throw new TypeError("Group allocation must be an object.");
149-
}
150141
if (typeof allocation.variant !== "string") {
151142
throw new TypeError("Group allocation variant must be a string.");
152143
}
@@ -167,9 +158,6 @@ function validatePercentileVariantAllocation(percentileAllocations: any) {
167158
}
168159

169160
for (const allocation of percentileAllocations) {
170-
if (typeof allocation !== "object") {
171-
throw new TypeError("Percentile allocation must be an object.");
172-
}
173161
if (typeof allocation.variant !== "string") {
174162
throw new TypeError("Percentile allocation variant must be a string.");
175163
}

0 commit comments

Comments
 (0)