[Lada-commits] [PATCH 2 of 2] Fix operator precedence bug

Wald Commits scm-commit at wald.intevation.org
Thu Apr 6 14:30:23 CEST 2017


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1491481799 -7200
# Node ID 4de04242f7ce7381c2e3762236571a4a234e0db7
# Parent  68e579063a47b9a0b049135a25c2a41707b79ffe
Fix operator precedence bug.

+ is evaluated before ===.

diff -r 68e579063a47 -r 4de04242f7ce app/view/window/ImportResponse.js
--- a/app/view/window/ImportResponse.js	Thu Apr 06 12:17:59 2017 +0200
+++ b/app/view/window/ImportResponse.js	Thu Apr 06 14:29:59 2017 +0200
@@ -167,7 +167,7 @@
                             validation.push('<ol>');
                             var parts = msgs[i].value.split('#');
                             var str = i18n.getMsg(parts[0]) +
-                                parts[1] === undefined ? '' : parts[1];
+                                (parts[1] === undefined ? '' : parts[1]);
                             validation.push(str + ' ('
                                 + i18n.getMsg(msgs[i].code.toString()) + ')');
                             validation.push('</ol>');
@@ -207,7 +207,7 @@
                             validation.push('<ol>');
                             var parts = msgs[i].value.split('#');
                             var str = i18n.getMsg(parts[0]) +
-                                parts[1] === undefined ? '' : parts[1];
+                                (parts[1] === undefined ? '' : parts[1]);
                             validation.push(str + ' ('
                                 + i18n.getMsg(msgs[i].code.toString()) + ')');
                             validation.push('</ol>');


More information about the Lada-commits mailing list