This commit is contained in:
Dan
2019-04-19 13:09:25 +01:00
parent 37dd1ec8f8
commit 3e657a6031
+6 -4
View File
@@ -799,10 +799,12 @@ export default class Store extends EventEmitter {
}
// This check is more expensive so it's gated
if (__DEV__) {
if (nextChildren.find(childID => {
const childElement = this._idToElement.get(childID);
return childElement == null || childElement.parentID !== id;
}) != null) {
if (
nextChildren.find(childID => {
const childElement = this._idToElement.get(childID);
return childElement == null || childElement.parentID !== id;
}) != null
) {
console.error(
`Children cannot be added or removed during a reorder operation.`
);