diff --git a/tools/eslint-rules/documented-errors.js b/tools/eslint-rules/documented-errors.js index f5f41dd8cc0417..a46fb885bb03b3 100644 --- a/tools/eslint-rules/documented-errors.js +++ b/tools/eslint-rules/documented-errors.js @@ -36,7 +36,7 @@ function getErrorsInDoc() { // If the code already exists in the Map, merge the new error data errors.set(code, { - ...(errors.get(code) || {}), + ...errors.get(code), ...error, }); }