@itfin/components 2.0.33 → 2.0.34

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itfin/components",
3
- "version": "2.0.33",
3
+ "version": "2.0.34",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,5 +1,5 @@
1
1
  import JSON5 from 'json5'
2
- import {isPathType} from "@itfin/components/src/components/panels";
2
+ import {isPathType} from "./index";
3
3
 
4
4
  export interface IPanel {
5
5
  type: string;
@@ -22,9 +22,8 @@ export function stackToHash(stack: IPanel[]) {
22
22
 
23
23
  export function hashToStack(hash: string|undefined): IPanel[] {
24
24
  let stack:IPanel[] = [];
25
- if (hash) {
26
- const str = hash.replace(isPathType() ? /^\// : /^#/, '');
27
-
25
+ const str = hash.replace(isPathType() ? /^\// : /^#/, '');
26
+ if (str) {
28
27
  stack = str.split(isPathType() ? '/' : '&').map(item => {
29
28
  if (!item.includes(PARAMS_SYMBOL)) {
30
29
  return { type: item.replace(COLLAPSE_SYMBOL, ''), isCollapsed: item.includes(COLLAPSE_SYMBOL), payload: {} };