cocoda-sdk 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.cjs
CHANGED
|
@@ -578,6 +578,9 @@ var BaseProvider = class {
|
|
|
578
578
|
return import_jskos_tools.default.isContainedIn(scheme, schemes);
|
|
579
579
|
}
|
|
580
580
|
adjustConcept(concept) {
|
|
581
|
+
if (!concept || concept.__SAVED__) {
|
|
582
|
+
return concept;
|
|
583
|
+
}
|
|
581
584
|
concept._getNarrower = (config) => {
|
|
582
585
|
return this.getNarrower({ ...config, concept });
|
|
583
586
|
};
|
|
@@ -602,9 +605,13 @@ var BaseProvider = class {
|
|
|
602
605
|
return registries;
|
|
603
606
|
}
|
|
604
607
|
adjustScheme(scheme) {
|
|
608
|
+
if (!scheme || scheme.__SAVED__) {
|
|
609
|
+
return scheme;
|
|
610
|
+
}
|
|
611
|
+
const previousRegistry = scheme._registry;
|
|
605
612
|
scheme._registry = this.cdk && this.cdk.registryForScheme(scheme);
|
|
606
|
-
if (!scheme._registry) {
|
|
607
|
-
scheme._registry = this;
|
|
613
|
+
if (!scheme._registry || previousRegistry === scheme._registry) {
|
|
614
|
+
scheme._registry = previousRegistry || this;
|
|
608
615
|
} else {
|
|
609
616
|
["concepts", "topConcepts"].forEach((key) => {
|
|
610
617
|
if (Array.isArray(scheme[key]) && (scheme[key].length === 0 || scheme[key][0] === null)) {
|