Skip to content

Commit

Permalink
Merge branch 'soney-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TalAter committed Jan 25, 2016
2 parents 88b2b13 + 07fc340 commit 598cf41
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 87 deletions.
9 changes: 5 additions & 4 deletions annyang.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,19 @@

// try and match recognized text to one of the commands on the list
for (var j = 0, l = commandsList.length; j < l; j++) {
var result = commandsList[j].command.exec(commandText);
var currentCommand = commandsList[j];
var result = currentCommand.command.exec(commandText);
if (result) {
var parameters = result.slice(1);
if (debugState) {
root.console.log('command matched: %c'+commandsList[j].originalPhrase, debugStyle);
root.console.log('command matched: %c'+currentCommand.originalPhrase, debugStyle);
if (parameters.length) {
root.console.log('with parameters', parameters);
}
}
// execute the matched command
commandsList[j].callback.apply(this, parameters);
invokeCallbacks(callbacks.resultMatch, commandText, commandsList[j].originalPhrase, results);
currentCommand.callback.apply(this, parameters);
invokeCallbacks(callbacks.resultMatch, commandText, currentCommand.originalPhrase, results);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion annyang.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sites/facebook.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 598cf41

Please sign in to comment.