@stackbit/sdk 0.2.28 → 0.2.31

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.
@@ -69,7 +69,7 @@ export function getModelsByQuery(query: ModelQuery, models: Model[]): Model[] {
69
69
  (
70
70
  modelGroups: {
71
71
  byFile: Model[];
72
- byLayout: Model[];
72
+ byType: Model[];
73
73
  byGlob: Model[];
74
74
  },
75
75
  model
@@ -77,7 +77,7 @@ export function getModelsByQuery(query: ModelQuery, models: Model[]): Model[] {
77
77
  if (_.has(model, 'file')) {
78
78
  modelGroups.byFile.push(model);
79
79
  } else if (objectType && _.has(model, modelTypeKeyPath)) {
80
- modelGroups.byLayout.push(model);
80
+ modelGroups.byType.push(model);
81
81
  } else {
82
82
  modelGroups.byGlob.push(model);
83
83
  }
@@ -85,7 +85,7 @@ export function getModelsByQuery(query: ModelQuery, models: Model[]): Model[] {
85
85
  },
86
86
  {
87
87
  byFile: [],
88
- byLayout: [],
88
+ byType: [],
89
89
  byGlob: []
90
90
  }
91
91
  );
@@ -105,13 +105,13 @@ export function getModelsByQuery(query: ModelQuery, models: Model[]): Model[] {
105
105
  return fileMatchedModels;
106
106
  }
107
107
 
108
- const layoutMatchedModels = _.filter(modelMatchGroups.byLayout, (model) => {
108
+ const typeMatchedModels = _.filter(modelMatchGroups.byType, (model) => {
109
109
  const modelType = _.get(model, modelTypeKeyPath);
110
110
  return objectType === modelType;
111
111
  });
112
112
 
113
- if (!_.isEmpty(layoutMatchedModels)) {
114
- return layoutMatchedModels;
113
+ if (!_.isEmpty(typeMatchedModels)) {
114
+ return typeMatchedModels;
115
115
  }
116
116
 
117
117
  return _.filter(modelMatchGroups.byGlob, (model) => {
package/src/.DS_Store DELETED
Binary file