Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/renderers/shared/reconciler/ReactUpdateQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ var ReactUpdateQueue = {
invariant(
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
'isn\'t callable.'
'`setState`, `replaceState`, or `forceUpdate` with a callback of type ' +
'%s. A function is expected',
typeof callback === 'object' && Object.keys(callback).length && Object.keys(callback).length < 20 ?
typeof callback + ' (keys: ' + Object.keys(callback) + ')' : typeof callback
);
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);

Expand Down Expand Up @@ -139,8 +141,10 @@ var ReactUpdateQueue = {
invariant(
typeof callback === 'function',
'enqueueCallback(...): You called `setProps`, `replaceProps`, ' +
'`setState`, `replaceState`, or `forceUpdate` with a callback that ' +
'isn\'t callable.'
'`setState`, `replaceState`, or `forceUpdate` with a callback of type ' +
'%s. A function is expected',
typeof callback === 'object' && Object.keys(callback).length && Object.keys(callback).length < 20 ?
typeof callback + ' (keys: ' + Object.keys(callback) + ')' : typeof callback
);
if (internalInstance._pendingCallbacks) {
internalInstance._pendingCallbacks.push(callback);
Expand Down