aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js
diff options
context:
space:
mode:
Diffstat (limited to 'lang/js')
-rw-r--r--lang/js/src/Helpers.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/lang/js/src/Helpers.js b/lang/js/src/Helpers.js
index 9fa5775b..aa267f69 100644
--- a/lang/js/src/Helpers.js
+++ b/lang/js/src/Helpers.js
@@ -115,7 +115,14 @@ export function isLongId (value){
*/
export function decode (property){
if (typeof property === 'string'){
- return decodeURIComponent(escape(property));
+ try {
+ return decodeURIComponent(escape(property));
+ }
+ catch (error){
+ if (error instanceof URIError) {
+ return property;
+ }
+ }
} else if (Array.isArray(property)){
let res = [];
for (let arr=0; arr < property.length; arr++){