@lancom/shared 0.0.363 → 0.0.365

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.
@@ -140,7 +140,7 @@ export function generateProductsLink($route, data, skipParams = false) {
140
140
  }
141
141
 
142
142
  Object.keys({ ...(($route && $route.query) || {}), ...data }).forEach(key => {
143
- const rootKeys = ['text', 'sort', 'page', 'category', 'type', 'brand', 'minimumQty', 'productionTime'];
143
+ const rootKeys = ['text', 'sort', 'page', 'category', 'type', 'brand', 'minimumQty', 'productionTime', 'srsltid'];
144
144
  if (!rootKeys.includes(key)) {
145
145
  let items = ($route && $route.query[key]) ? $route.query[key].split(',') : [];
146
146
  items = (data[key] ? (items.includes(data[key]) ? items.filter(c => c !== data[key]) : [...items, data[key]]) : items).join(',');
@@ -10,6 +10,11 @@ export default async function ({ store, route, redirect, error }) {
10
10
  const routeInfo = await store.dispatch('page/fetchRouteInfo', data);
11
11
  if (routeInfo?.type === 'redirect' && routeInfo.redirectTo) {
12
12
  redirect(301, route.fullPath.replace(route.path, routeInfo.redirectTo));
13
+ } else if (routeInfo?.type === 'deleted') {
14
+ error({
15
+ statusCode: 410,
16
+ message: 'Page has been deleted'
17
+ });
13
18
  }
14
19
  } else {
15
20
  const data = {
@@ -39,7 +39,7 @@ const metaInfo = {
39
39
  head() {
40
40
  const hasQueryParams = Object
41
41
  .keys(this.$route.query || {})
42
- .filter(key => !['color', 'store','price'].includes(`${key || ''}`.toLowerCase()))
42
+ .filter(key => !['color', 'store','price','size'].includes(`${key || ''}`.toLowerCase()))
43
43
  .length > 0;
44
44
 
45
45
  const { short_text: shortText, image, meta = {} } = this.routeInfo || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.363",
3
+ "version": "0.0.365",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {