Skip to content

Commit

Permalink
fix: remove false positive invariant when changing a component's chil…
Browse files Browse the repository at this point in the history
…dren

fixes #493
  • Loading branch information
trezy committed Jul 12, 2024
1 parent 1a20fc6 commit 34e08ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/insertBefore.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function insertBefore(parentInstance, childInstance, beforeChildInstance)
{
log('info', 'lifecycle::insertBefore');

invariant(childInstance === beforeChildInstance, 'Cannot insert node before itself');
invariant(childInstance !== beforeChildInstance, 'Cannot insert node before itself');

if (parentInstance.children.indexOf(childInstance) === -1)
{
Expand Down

0 comments on commit 34e08ff

Please sign in to comment.