Skip to content

Commit

Permalink
fix check for learning mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Brown committed Jan 18, 2018
1 parent 68b3359 commit 8a4a3e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skills/learning_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ module.exports = function(controller) {
convo.setVar('bot',convo.context.bot.identity);

// if learning mode is not enabled, redirect to an error
if (!process.env.LEARNING_MODE) {
if (process.env.LEARNING_MODE!=='true') {
convo.gotoThread('error_not_enabled')
}
next();
});

if (process.env.LEARNING_MODE) {
if (process.env.LEARNING_MODE=='true') {
console.log('--------------------------------------------');
console.log('> LEARNING MODE ENABLED!');
console.log('> This bot can modify itself! Disable learning mode in production!!')
Expand Down

0 comments on commit 8a4a3e4

Please sign in to comment.