Fixed inverted assert in duplicate name detection for ABI encoding (#3792).

This commit is contained in:
Richard Moore 2023-02-18 13:45:45 -05:00
parent 48bbef7ade
commit 762c2f34ea

View File

@ -26,7 +26,7 @@ export function pack(writer: Writer, coders: ReadonlyArray<Coder>, values: Array
assert(name, "cannot encode object for signature with missing names",
"INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });
assert(unique[name], "cannot encode object for signature with duplicate names",
assert(!unique[name], "cannot encode object for signature with duplicate names",
"INVALID_ARGUMENT", { argument: "values", info: { coder }, value: values });
unique[name] = true;