Эх сурвалжийг харах

HUE-9552 [fb] Folder Fails to Load when the foldername contains # (asnaik)

Akhil Naik 5 жил өмнө
parent
commit
c6f6ce6e8a

+ 2 - 1
desktop/core/src/desktop/js/utils/hueUtils.js

@@ -168,7 +168,8 @@ export const changeURL = (newURL, params) => {
     url += (url.indexOf('?') === -1 ? '?' : '&') + extraSearch;
     url += (url.indexOf('?') === -1 ? '?' : '&') + extraSearch;
   }
   }
   if (hashSplit.length > 1) {
   if (hashSplit.length > 1) {
-    url += '#' + hashSplit[1];
+    //the foldername may contain # , so create substring ignoring first #
+    url += '#' + newURL.substring(newURL.indexOf('#') + 1);
   } else if (window.location.hash) {
   } else if (window.location.hash) {
     url += window.location.hash;
     url += window.location.hash;
   }
   }