stuff no longer gets deleted when moved into itself

This commit is contained in:
Jesper Møller Jensen
2023-01-27 09:20:30 +01:00
parent cb4ed594e4
commit f944348db3

View File

@@ -34,6 +34,9 @@ export class UmbEntityData<T extends Entity> extends UmbData<T> {
move(keys: Array<string>, destination: string) {
const movedItems: Array<T> = [];
//Don't do anything if something is moved into itself.
if (keys.includes(destination)) return [];
keys.forEach((key) => {
const item = this.getByKey(key);
if (!item) return;