@yuuvis/client-core 2.1.21 → 2.1.23
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.
|
@@ -2670,11 +2670,12 @@ class ObjectConfigService {
|
|
|
2670
2670
|
return this.#user.saveObjectConfig(this.#objectConfigs);
|
|
2671
2671
|
}
|
|
2672
2672
|
#updateObjectConfig(configs, bucket) {
|
|
2673
|
-
if (!this.#objectConfigs)
|
|
2673
|
+
if (!this.#objectConfigs) {
|
|
2674
2674
|
this.#objectConfigs = {
|
|
2675
2675
|
main: {},
|
|
2676
2676
|
buckets: []
|
|
2677
2677
|
};
|
|
2678
|
+
}
|
|
2678
2679
|
if (bucket) {
|
|
2679
2680
|
// does bucket exist?
|
|
2680
2681
|
const tileBucketIdx = this.#objectConfigs.buckets.findIndex((b) => b.id === bucket);
|
|
@@ -2690,20 +2691,14 @@ class ObjectConfigService {
|
|
|
2690
2691
|
});
|
|
2691
2692
|
}
|
|
2692
2693
|
else {
|
|
2693
|
-
const
|
|
2694
|
+
const newBucket = { id: bucket, configs: {} };
|
|
2694
2695
|
Object.keys(configs).forEach((objectTypeId) => {
|
|
2695
2696
|
const config = configs[objectTypeId];
|
|
2696
2697
|
if (config) {
|
|
2697
|
-
configs[objectTypeId] = config;
|
|
2698
|
-
}
|
|
2699
|
-
else {
|
|
2700
|
-
delete configs[objectTypeId];
|
|
2698
|
+
newBucket.configs[objectTypeId] = config;
|
|
2701
2699
|
}
|
|
2702
2700
|
});
|
|
2703
|
-
this.#objectConfigs.buckets.push(
|
|
2704
|
-
id: bucket,
|
|
2705
|
-
configs
|
|
2706
|
-
});
|
|
2701
|
+
this.#objectConfigs.buckets.push(newBucket);
|
|
2707
2702
|
}
|
|
2708
2703
|
}
|
|
2709
2704
|
else {
|