瀏覽代碼

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

Akhil Naik 5 年之前
父節點
當前提交
c6f6ce6e8a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      desktop/core/src/desktop/js/utils/hueUtils.js

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

@@ -168,7 +168,8 @@ export const changeURL = (newURL, params) => {
     url += (url.indexOf('?') === -1 ? '?' : '&') + extraSearch;
   }
   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) {
     url += window.location.hash;
   }