Skip to content
Snippets Groups Projects
Commit a34867d2 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Fix url encoding and error catching

parent 717f2487
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,8 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -38,7 +38,8 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
// }); // });
// sadly there there is no entity url without "collectionOperations" in entity KnowledgeBaseWebPageElement! // sadly there there is no entity url without "collectionOperations" in entity KnowledgeBaseWebPageElement!
const apiUrl = utils.getAPiUrl("/web_page_elements/knowledge_base_web_page_elements/") + commonUtils.base64EncodeUnicode(that.value); const apiUrl = utils.getAPiUrl("/web_page_elements/knowledge_base_web_page_elements/") +
encodeURIComponent(commonUtils.base64EncodeUnicode(encodeURIComponent(that.value)));
window.addEventListener("vpu-auth-init", function(e) window.addEventListener("vpu-auth-init", function(e)
{ {
...@@ -55,7 +56,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -55,7 +56,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
} }
}) })
// catch e.g. 404 errors // catch e.g. 404 errors
.catch(error => console.error(error)); .catch();
}); });
this.updateComplete.then(()=>{ this.updateComplete.then(()=>{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment