@tsed/schema 6.76.0 → 6.77.0

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.
@@ -176,11 +176,22 @@ function execMapper(type, schema, options) {
176
176
  */
177
177
  const JsonEntitiesContainer = new Map();
178
178
 
179
+ /**
180
+ * @ignore
181
+ */
182
+
183
+ function isJsonEntityStore(model) {
184
+ return model.isStore;
185
+ }
179
186
  /**
180
187
  * @ignore
181
188
  */
182
189
 
183
190
  function getJsonEntityStore(...args) {
191
+ if (isJsonEntityStore(args[0])) {
192
+ return args[0];
193
+ }
194
+
184
195
  const store = Store.from(...args);
185
196
 
186
197
  if (!store.has("JsonEntityStore")) {
@@ -197,9 +208,6 @@ function getJsonEntityStore(...args) {
197
208
 
198
209
  return store.get("JsonEntityStore");
199
210
  }
200
- function isJsonEntityStore(model) {
201
- return model.isStore;
202
- }
203
211
 
204
212
  class JsonLazyRef {
205
213
  constructor(getType) {
@@ -2870,7 +2878,7 @@ function get$1(entity, options) {
2870
2878
  }
2871
2879
 
2872
2880
  function getJsonSchema(model, options = {}) {
2873
- const entity = isJsonEntityStore(model) ? model : getJsonEntityStore(model);
2881
+ const entity = getJsonEntityStore(model);
2874
2882
  options = _extends({
2875
2883
  endpoint: true,
2876
2884
  groups: []