File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -489,14 +489,16 @@ var EasyAutocomplete = (function(scope) {
489489
490490 function checkInputPhraseMatchResponse ( inputPhrase , data ) {
491491
492- if ( config . get ( "matchResponseProperty" ) !== false || typeof config . get ( "matchResponseProperty" ) === "string" ) {
492+ if ( config . get ( "matchResponseProperty" ) !== false ) {
493+ if ( typeof config . get ( "matchResponseProperty" ) === "string" ) {
494+ return ( data [ config . get ( "matchResponseProperty" ) ] == inputPhrase ) ;
495+ }
493496
494- if ( data [ config . get ( "matchResponseProperty" ) ] == inputPhrase ) {
495- return true ;
496- } else {
497- return false ;
497+ if ( typeof config . get ( "matchResponseProperty" ) === "function" ) {
498+ return ( config . get ( "matchResponseProperty" ) ( data ) === inputPhrase ) ;
498499 }
499500
501+ return true ;
500502 } else {
501503 return true ;
502504 }
You can’t perform that action at this time.
0 commit comments