]> source.dussan.org Git - sonarqube.git/commitdiff
Remove usages of non-standard startsWith function
authorStas Vilchik <vilchiks@gmail.com>
Wed, 30 Jul 2014 07:22:54 +0000 (09:22 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 30 Jul 2014 07:50:56 +0000 (09:50 +0200)
server/sonar-web/src/main/js/application.js
server/sonar-web/src/main/js/navigator/filters/metric-filters.js

index 730edbfc0e0b99df1c8f579e5eba25506ff6ff1b..c17aeadeaea607c0e06edd01c306b5fd3dfba615 100644 (file)
@@ -58,7 +58,7 @@ function resourceViewerOnBulkIssues() {
     }
   } else {
     // No tab selected, see how to add tab parameter
-    if (window.location.search.startsWith('?')) {
+    if (window.location.search.indexOf('?') === 0) {
       window.location.search += ('&' + issuesTab);
     } else {
       window.location.search += ('?' + issuesTab);
index 8de1bedd501d0dbe4b3e2d93403b7b353253e247..161cf6974f062c792fa2cea941495d417c334d0f 100644 (file)
@@ -15,7 +15,7 @@ define([
 
     inputChanged: function() {
       var metric = this.$('[name=metric]').val(),
-          isDifferentialMetric = metric.startsWith('new_'),
+          isDifferentialMetric = metric.indexOf('new_') === 0,
           periodSelect = this.$('[name=period]'),
           period = periodSelect.val(),
           optionZero = periodSelect.children('[value="0"]'),