Skip to content

Commit

Permalink
Fix typo in error code map (#16373)
Browse files Browse the repository at this point in the history
"responer" -> "responder"

I also removed an unused error code that never shipped.
  • Loading branch information
acdlite authored Aug 12, 2019
1 parent 62b04cf commit c203471
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberCompleteWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ function updateEventListener(
invariant(
responder && responder.$$typeof === REACT_RESPONDER_TYPE,
'An invalid value was used as an event listener. Expect one or many event ' +
'listeners created via React.unstable_useResponer().',
'listeners created via React.unstable_useResponder().',
);
const listenerProps = ((props: any): Object);
if (visistedResponders.has(responder)) {
Expand Down
3 changes: 1 addition & 2 deletions scripts/error-codes/codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,5 @@
"336": "The \"%s\" event responder cannot be used via the \"useEvent\" hook.",
"337": "An invalid event responder was provided to host component",
"338": "ReactDOMServer does not yet support the fundamental API.",
"339": "An invalid value was used as an event responder. Expect one or many event responders created via React.unstable_createResponer().",
"340": "An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponer()."
"339": "An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder()."
}

0 comments on commit c203471

Please sign in to comment.