diff --git a/vendor/assets/coffeescripts/headless_reporter_result.coffee b/vendor/assets/coffeescripts/headless_reporter_result.coffee index 0c8e752..7945ad8 100644 --- a/vendor/assets/coffeescripts/headless_reporter_result.coffee +++ b/vendor/assets/coffeescripts/headless_reporter_result.coffee @@ -43,4 +43,6 @@ class window.HeadlessReporterResult if index > bestChoice.accuracy bestChoice = { accuracy: index, file: file, lineNumber: lineNumber } + break if index == splitName.length + bestChoice diff --git a/vendor/assets/javascripts/headless_reporter_result.js b/vendor/assets/javascripts/headless_reporter_result.js index 3ffc20f..3d71200 100644 --- a/vendor/assets/javascripts/headless_reporter_result.js +++ b/vendor/assets/javascripts/headless_reporter_result.js @@ -70,6 +70,7 @@ lineNumber: lineNumber }; } + if (index === splitName.length) break; } return bestChoice; };