Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix JS error from TypeaheadCompositeSource.

Summary:
The callback function childWaiting checks the length of this.result which could
be null and cause JS error.
  • Loading branch information...
commit 050055ff9fbfcd04342bca3125b6c0101b0123de 1 parent 37f75c9
@hedgerwang authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/lib/control/typeahead/source/TypeaheadCompositeSource.js
View
4 src/lib/control/typeahead/source/TypeaheadCompositeSource.js
@@ -45,13 +45,13 @@ JX.install('TypeaheadCompositeSource', {
},
childWaiting : function() {
- if (!this.results.length) {
+ if (!this.results || !this.results.length) {
this.invoke('waiting');
}
},
childResultsReady : function(nodes) {
- this.results = this.mergeResults(this.results, nodes);
+ this.results = this.mergeResults(this.results || [], nodes);
this.invoke('resultsready', this.results);
},

0 comments on commit 050055f

Please sign in to comment.
Something went wrong with that request. Please try again.