Commit 2411a6e0 authored by Stefane Fermigier's avatar Stefane Fermigier Committed by Romain Courteaud

[documentstorage] fix operator precedence errors.

parent 745ec12d
...@@ -73,11 +73,8 @@ ...@@ -73,11 +73,8 @@
if (atob(exec[1]) === id) { if (atob(exec[1]) === id) {
attachments[atob(exec[2])] = {}; attachments[atob(exec[2])] = {};
} }
} catch (error) { } catch (ignore) {
// Check if unable to decode base64 data // Check if unable to decode base64 data
if (!error instanceof ReferenceError) {
throw error;
}
} }
} }
} }
...@@ -143,11 +140,8 @@ ...@@ -143,11 +140,8 @@
if (DOCUMENT_REGEXP.test(key)) { if (DOCUMENT_REGEXP.test(key)) {
try { try {
id = atob(DOCUMENT_REGEXP.exec(key)[1]); id = atob(DOCUMENT_REGEXP.exec(key)[1]);
} catch (error) { } catch (ignore) {
// Check if unable to decode base64 data // Check if unable to decode base64 data
if (!error instanceof ReferenceError) {
throw error;
}
} }
if (id !== undefined) { if (id !== undefined) {
id_dict[id] = null; id_dict[id] = null;
...@@ -157,11 +151,8 @@ ...@@ -157,11 +151,8 @@
try { try {
id = atob(exec[1]); id = atob(exec[1]);
attachment = atob(exec[2]); attachment = atob(exec[2]);
} catch (error) { } catch (ignore) {
// Check if unable to decode base64 data // Check if unable to decode base64 data
if (!error instanceof ReferenceError) {
throw error;
}
} }
if (attachment !== undefined) { if (attachment !== undefined) {
if (!id_dict.hasOwnProperty(id)) { if (!id_dict.hasOwnProperty(id)) {
...@@ -212,11 +203,8 @@ ...@@ -212,11 +203,8 @@
id: atob(DOCUMENT_REGEXP.exec(key)[1]), id: atob(DOCUMENT_REGEXP.exec(key)[1]),
value: {} value: {}
}); });
} catch (error) { } catch (ignore) {
// Check if unable to decode base64 data // Check if unable to decode base64 data
if (!error instanceof ReferenceError) {
throw error;
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment