fix: ignore obsolete selection of resize handlers when deleting after a resize (#27767)

This commit is contained in:
Robert Monfera 2018-12-26 22:01:46 +01:00 committed by GitHub
parent 72680f2fa0
commit 580cfccad8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,7 @@ const matrix = require('./matrix');
const matrix2d = require('./matrix2d');
const {
arrayToMap,
disjunctiveUnion,
identity,
flatten,
@ -207,7 +208,10 @@ const contentShape = allShapes => shape =>
? contentShape(allShapes)(allShapes.find(s => s.id === shape.parent))
: shape;
const contentShapes = (allShapes, shapes) => shapes.map(contentShape(allShapes));
const contentShapes = (allShapes, shapes) => {
const idMap = arrayToMap(allShapes.map(shape => shape.id));
return shapes.filter(shape => idMap[shape.id]).map(contentShape(allShapes));
};
const selectionState = select(
(