Updated linter config and curly conditional blocks

This commit is contained in:
Tim Schaub
2016-11-12 13:29:19 -07:00
parent 7c5e428578
commit d4295e7ed7
2 changed files with 7 additions and 3 deletions

View File

@@ -54,7 +54,7 @@
"coveralls": "2.11.15", "coveralls": "2.11.15",
"debounce": "^1.0.0", "debounce": "^1.0.0",
"eslint": "3.10.0", "eslint": "3.10.0",
"eslint-config-openlayers": "5.0.0", "eslint-config-openlayers": "6.0.0",
"eslint-plugin-openlayers-internal": "2.2.0", "eslint-plugin-openlayers-internal": "2.2.0",
"expect.js": "0.3.1", "expect.js": "0.3.1",
"gaze": "^1.0.0", "gaze": "^1.0.0",

View File

@@ -27,8 +27,12 @@ ol.string.compareVersions = function(v1, v2) {
var n1 = parseInt(s1[i] || '0', 10); var n1 = parseInt(s1[i] || '0', 10);
var n2 = parseInt(s2[i] || '0', 10); var n2 = parseInt(s2[i] || '0', 10);
if (n1 > n2) return 1; if (n1 > n2) {
if (n2 > n1) return -1; return 1;
}
if (n2 > n1) {
return -1;
}
} }
return 0; return 0;