Skip to content

Commit

Permalink
Make "unexpected batch number" a warning (#7133)
Browse files Browse the repository at this point in the history
This was added to catch internal errors in React but doesn't seem to be doing much good except frustrating people more when their apps throw (#6895, FB-internal t11950821). Until more proper error boundaries land, let's make this a warning.
(cherry picked from commit abcd567)
  • Loading branch information
sophiebits authored and zpao committed Jul 13, 2016
1 parent 891e087 commit d441128
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderers/shared/stack/reconciler/ReactReconciler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
var ReactRef = require('ReactRef');
var ReactInstrumentation = require('ReactInstrumentation');

var invariant = require('invariant');
var warning = require('warning');

/**
* Helper to call ReactRef.attachRefs with this composite component, split out
Expand Down Expand Up @@ -206,7 +206,7 @@ var ReactReconciler = {
if (internalInstance._updateBatchNumber !== updateBatchNumber) {
// The component's enqueued batch number should always be the current
// batch or the following one.
invariant(
warning(
internalInstance._updateBatchNumber == null ||
internalInstance._updateBatchNumber === updateBatchNumber + 1,
'performUpdateIfNecessary: Unexpected batch number (current %s, ' +
Expand Down

0 comments on commit d441128

Please sign in to comment.