diff --git a/src/helpers/insertBefore.js b/src/helpers/insertBefore.js index a70f40f9..b3fee727 100644 --- a/src/helpers/insertBefore.js +++ b/src/helpers/insertBefore.js @@ -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) {