renew name
This commit is contained in:
@@ -81,7 +81,7 @@ export function useSectionCommands(options: Options) {
|
||||
options.setCreatedEntities([]);
|
||||
const geoEntityIds = new Set((snapshot?.geometry_entity || []).map((row) => row.entity_id));
|
||||
const linkedByWikiIds = new Set(
|
||||
(snapshot?.entity_wikis || [])
|
||||
(snapshot?.entity_wiki || [])
|
||||
.filter((l) => l?.operation !== "delete")
|
||||
.map((l) => l.entity_id)
|
||||
);
|
||||
@@ -94,7 +94,7 @@ export function useSectionCommands(options: Options) {
|
||||
&& e.operation !== "delete"
|
||||
));
|
||||
options.setWikis(snapshot?.wikis || []);
|
||||
options.setEntityWikiLinks(snapshot?.entity_wikis || []);
|
||||
options.setEntityWikiLinks(snapshot?.entity_wiki || []);
|
||||
options.setSelectedFeatureId(null);
|
||||
options.setEntityFormStatus(null);
|
||||
}, [options]);
|
||||
|
||||
@@ -133,7 +133,7 @@ export function normalizeEditorSnapshot(raw: unknown): EditorSnapshot | null {
|
||||
})
|
||||
: undefined;
|
||||
|
||||
const entityWikisRaw = snapshot.entity_wikis;
|
||||
const entityWikisRaw = snapshot.entity_wiki ?? snapshot.entity_wikis;
|
||||
const entityWikis: EntityWikiLinkSnapshot[] | undefined = Array.isArray(entityWikisRaw)
|
||||
? entityWikisRaw
|
||||
.filter(isRecord)
|
||||
@@ -186,7 +186,7 @@ export function normalizeEditorSnapshot(raw: unknown): EditorSnapshot | null {
|
||||
geometries,
|
||||
wikis,
|
||||
geometry_entity: geometryEntity || migratedGeometryEntity,
|
||||
entity_wikis: entityWikis,
|
||||
entity_wiki: entityWikis,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ export function buildEditorSnapshot(options: {
|
||||
geometries,
|
||||
geometry_entity: geometryEntity,
|
||||
wikis,
|
||||
entity_wikis: entityWikis,
|
||||
entity_wiki: entityWikis,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user