[Lada-commits] [PATCH 1 of 5] Use indexOf instead of contains to check if a substring exists
Wald Commits
scm-commit at wald.intevation.org
Wed Mar 11 13:13:53 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426065223 -3600
# Node ID a241362cda686076fb95be36a919026a38b0edf8
# Parent 4248028246489fa151cd5036e8bbef40e52d509e
Use indexOf instead of contains to check if a substring exists.
diff -r 424802824648 -r a241362cda68 app/view/window/ProbeEdit.js
--- a/app/view/window/ProbeEdit.js Tue Mar 10 17:12:53 2015 +0100
+++ b/app/view/window/ProbeEdit.js Wed Mar 11 10:13:43 2015 +0100
@@ -133,7 +133,7 @@
var keyText;
var i18n = Lada.getApplication().bundle;
for (key in errors) {
- if (key && key.contains('Ort')) {
+ if (key && key.indexOf('Ort') > -1) {
errorOrt = true;
content = errors[key];
keyText = i18n.getMsg(key);
@@ -144,7 +144,7 @@
}
}
for (key in warnings) {
- if (key && key.contains('Ort')) {
+ if (key && key.indexOf('Ort') > -1) {
warningOrt = true;
content = warnings[key];
keyText = i18n.getMsg(key);
More information about the Lada-commits
mailing list