Skip to content

Commit

Permalink
fix: Bug where cache does not exist before use
Browse files Browse the repository at this point in the history
  • Loading branch information
gf3 committed Feb 18, 2012
1 parent 0a55928 commit 68c026c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/jerk.js
Expand Up @@ -112,6 +112,9 @@ Jerk = new ( function Jerk() {
if ( message.person.nick == bot.options.nick ) if ( message.person.nick == bot.options.nick )
return return


if ( ! clients[ message.params[0] ] )
clients[ message.params[0] ] = {}

// Add user to client cache // Add user to client cache
clients[ message.params[0] ][ _normalize_nick( message.person.nick ) ] = true clients[ message.params[0] ][ _normalize_nick( message.person.nick ) ] = true


Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -8,7 +8,7 @@
, "Tomás Senart <tsenart@me.com> http://about.me/tsenart" , "Tomás Senart <tsenart@me.com> http://about.me/tsenart"
] ]
, "homepage" : "http://github.com/gf3/Jerk" , "homepage" : "http://github.com/gf3/Jerk"
, "version" : "1.1.22" , "version" : "1.1.23"
, "main" : "./lib/jerk" , "main" : "./lib/jerk"
, "dependencies" : , "dependencies" :
{ "irc-js": "=2.0.0-beta" { "irc-js": "=2.0.0-beta"
Expand Down

0 comments on commit 68c026c

Please sign in to comment.