Skip to content

Commit

Permalink
Merge pull request #23 from dmitrizzle/remove-eval
Browse files Browse the repository at this point in the history
replaced eval() with window[]
  • Loading branch information
dmitrizzle authored Apr 17, 2017
2 parents a5d32a3 + 0312a6d commit 1d959c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion component/Bubbles.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function Bubbles(container, self, options) {

// navigate "answers"
this.answer = function(key){
var func = function(key){ typeof window[key] === "function" ? eval(key)() : false; }
var func = function(key){ typeof window[key] === "function" ? window[key]() : false; }
this.convo[key] !== undefined ? this.reply(this.convo[key]) : func(key);
};

Expand Down
2 changes: 1 addition & 1 deletion component/start-here/hello.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"reply": [
{
"question": "👍",
"answer" : "start"
"answer" : "functionTwo"
},
{
"question": "What for? 🤔",
Expand Down

0 comments on commit 1d959c7

Please sign in to comment.