@mjhls/mjh-framework 1.0.1022 → 1.0.1023

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.
@@ -163,43 +163,42 @@ TaxonomyDescription.getDescription = function () {
163
163
  var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2() {
164
164
  var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
165
165
  var client = arguments[1];
166
- var parent_id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
167
- var parent_query, query, summary, taxonomyData;
166
+ var ref_query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
167
+ var query, summary, taxonomyData;
168
168
  return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
169
169
  while (1) {
170
170
  switch (_context2.prev = _context2.next) {
171
171
  case 0:
172
- parent_query = parent_id ? ' && parent._ref == \'' + parent_id + '\' ' : '';
173
- query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\' ' + parent_query + '][0]{summary,pixelTrackingCode->}';
172
+ query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\' ' + ref_query + '][0]{summary,pixelTrackingCode->}';
174
173
  summary = [];
175
- _context2.prev = 3;
176
- _context2.next = 6;
174
+ _context2.prev = 2;
175
+ _context2.next = 5;
177
176
  return client.fetch(query);
178
177
 
179
- case 6:
178
+ case 5:
180
179
  taxonomyData = _context2.sent;
181
180
 
182
181
  if (taxonomyData.summary) {
183
182
  summary = taxonomyData.summary;
184
183
  }
185
- _context2.next = 13;
184
+ _context2.next = 12;
186
185
  break;
187
186
 
188
- case 10:
189
- _context2.prev = 10;
190
- _context2.t0 = _context2['catch'](3);
187
+ case 9:
188
+ _context2.prev = 9;
189
+ _context2.t0 = _context2['catch'](2);
191
190
 
192
191
  console.error(_context2.t0);
193
192
 
194
- case 13:
193
+ case 12:
195
194
  return _context2.abrupt('return', summary);
196
195
 
197
- case 14:
196
+ case 13:
198
197
  case 'end':
199
198
  return _context2.stop();
200
199
  }
201
200
  }
202
- }, _callee2, _this, [[3, 10]]);
201
+ }, _callee2, _this, [[2, 9]]);
203
202
  }));
204
203
 
205
204
  return function () {
@@ -156,43 +156,42 @@ TaxonomyDescription.getDescription = function () {
156
156
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
157
157
  var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
158
158
  var client = arguments[1];
159
- var parent_id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
160
- var parent_query, query, summary, taxonomyData;
159
+ var ref_query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
160
+ var query, summary, taxonomyData;
161
161
  return regenerator.wrap(function _callee2$(_context2) {
162
162
  while (1) {
163
163
  switch (_context2.prev = _context2.next) {
164
164
  case 0:
165
- parent_query = parent_id ? ' && parent._ref == \'' + parent_id + '\' ' : '';
166
- query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\' ' + parent_query + '][0]{summary,pixelTrackingCode->}';
165
+ query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\' ' + ref_query + '][0]{summary,pixelTrackingCode->}';
167
166
  summary = [];
168
- _context2.prev = 3;
169
- _context2.next = 6;
167
+ _context2.prev = 2;
168
+ _context2.next = 5;
170
169
  return client.fetch(query);
171
170
 
172
- case 6:
171
+ case 5:
173
172
  taxonomyData = _context2.sent;
174
173
 
175
174
  if (taxonomyData.summary) {
176
175
  summary = taxonomyData.summary;
177
176
  }
178
- _context2.next = 13;
177
+ _context2.next = 12;
179
178
  break;
180
179
 
181
- case 10:
182
- _context2.prev = 10;
183
- _context2.t0 = _context2['catch'](3);
180
+ case 9:
181
+ _context2.prev = 9;
182
+ _context2.t0 = _context2['catch'](2);
184
183
 
185
184
  console.error(_context2.t0);
186
185
 
187
- case 13:
186
+ case 12:
188
187
  return _context2.abrupt('return', summary);
189
188
 
190
- case 14:
189
+ case 13:
191
190
  case 'end':
192
191
  return _context2.stop();
193
192
  }
194
193
  }
195
- }, _callee2, _this, [[3, 10]]);
194
+ }, _callee2, _this, [[2, 9]]);
196
195
  }));
197
196
 
198
197
  return function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.1022",
3
+ "version": "1.0.1023",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",