fix exceptions during unit tests

This commit is contained in:
Randy Edmunds committed 2013-09-10 16:03:29 -07:00
1 parent 0cb158adb0
commit 3ea830d5ba
1 file changed
+5
@@ -327,6 +327,11 @@ define(function (require, exports, module) {
*/
function getSessionHints(query, cursor, type, token, $deferredHints) {
// We're getting here with a null session object in units tests
if (!session) {
return null;
}
var hintResults = session.getHints(query, getStringMatcher());
if (hintResults.needGuesses) {
var guessesResponse = ScopeManager.requestGuesses(session,