impaktapps-ui-builder 0.0.101-alpha.119 → 0.0.101-alpha.120

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": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.119",
3
+ "version": "0.0.101-alpha.120",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -93,13 +93,11 @@ export default (funcParams: funcParamsProps) => {
93
93
  const programId = JSON.parse(window.sessionStorage.getItem("ProgramID") || "null")?.value;
94
94
  if (config?.programIdRequired && programId) {
95
95
  if (pathParts.length < 2) {
96
- // Case: programId not in path, just append it
97
96
  funcParams.store.navigate(
98
97
  `${funcParams.store.location.pathname}/${programId}`
99
98
  );
100
- } else {
101
- // Case: already has some value — replace last segment with programId
102
- pathParts[2] = programId; // Assuming path like /:id/:programId
99
+ } else if(pathParts[2] !== programId) {
100
+ pathParts[2] = programId;
103
101
  const newPath = pathParts.slice(0, 3).join("/") + "/";
104
102
  funcParams.store.navigate(newPath);
105
103
  }