Skip to content

Commit

Permalink
fix(exo)!: reject extra args
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Dec 11, 2023
1 parent aa9c140 commit b38f070
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/exo/src/exo-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const PassableMethodGuard = M.call().rest(M.any()).returns(M.any());
* @param {import('@endo/pass-style').Passable[]} syncArgs
* @param {MatchConfig} matchConfig
* @param {string} [label]
* @returns {import('@endo/pass-style').Passable[]} Returns the args that should be passed to the
* raw method
* @returns {import('@endo/pass-style').Passable[]}
* Returns the args that should be passed to the raw method.
*/
const defendSyncArgs = (syncArgs, matchConfig, label = undefined) => {
const {
Expand All @@ -69,7 +69,8 @@ const defendSyncArgs = (syncArgs, matchConfig, label = undefined) => {
redactedIndices,
} = matchConfig;

// Use syncArgs if possible, but copy it when necessary to implement redactions.
// Use syncArgs if possible, but copy it when necessary to implement
// redactions.
let matchableArgs = syncArgs;
if (restArgGuardIsRaw && syncArgs.length > declaredLen) {
const restLen = syncArgs.length - declaredLen;
Expand Down

0 comments on commit b38f070

Please sign in to comment.