Fix bug with concurrent token updates

This commit is contained in:
Mitchell McCaffrey 2020-04-21 18:01:45 +10:00
parent 3c204377d6
commit 96efcfd5de

View File

@ -19,7 +19,7 @@ function ProxyToken({ tokenClassName, onProxyDragEnd }) {
const proxyOnMap = useRef(false);
useEffect(() => {
const tokenInteract = interact(`.${tokenClassName}`).draggable({
interact(`.${tokenClassName}`).draggable({
listeners: {
start: (event) => {
let target = event.target;
@ -110,9 +110,6 @@ function ProxyToken({ tokenClassName, onProxyDragEnd }) {
},
},
});
return () => {
tokenInteract.unset();
};
}, [onProxyDragEnd, tokenClassName, proxyContainer]);
if (!imageSource) {