Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Fix crawlComplete exception when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Gerber committed Aug 14, 2016
1 parent eba3d47 commit 653ac8c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/search/FindInFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,19 @@ define(function (require, exports, module) {
}

function nodeFileCacheComplete(event, numFiles, cacheSize) {
var projectName = ProjectManager.getProjectRoot().name || "noName00";
if (/\/test\/SpecRunner\.html$/.test(window.location.pathname)) {
// Ignore the event in the SpecRunner window
return;
}

var projectRoot = ProjectManager.getProjectRoot(),
projectName = projectRoot ? projectRoot.name : null;

if (!projectName) {
console.error("'File cache complete' event received, but no project root found");
projectName = "noName00";
}

FindUtils.setInstantSearchDisabled(false);
// Node search could be disabled if some error has happened in node. But upon
// project change, if we get this message, then it means that node search is working,
Expand Down

0 comments on commit 653ac8c

Please sign in to comment.