Skip to content

Commit aa235fd

Browse files
committed
fix(collections): fixed add cedar metadata to collection
1 parent 1cd0d2b commit aa235fd

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/features/collections/components/add-to-collection/collection-metadata-step/collection-metadata-step.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ <h3>{{ 'collections.addToCollection.collectionMetadata' | translate }}</h3>
1919
#cedarViewer
2020
[config]="cedarViewerConfig"
2121
[templateObject]="cedarTpl.attributes.template"
22+
[instanceObject]="cedarFormData()"
2223
></cedar-artifact-viewer>
2324
}
2425
} @else {

src/app/features/collections/components/add-to-collection/collection-metadata-step/collection-metadata-step.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ export class CollectionMetadataStepComponent {
206206
effect(() => {
207207
if (!this.isStepActive()) return;
208208

209-
this.existingCedarRecord();
209+
const record = this.existingCedarRecord();
210+
const saved = this.collectionMetadataSaved();
211+
212+
if (!record?.attributes?.metadata && !saved) return;
210213

211214
this.syncCedarInstance(this.cedarEditor()?.nativeElement);
212215
});

0 commit comments

Comments
 (0)