summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJay Thomas <degradinglight@gmail.com>2013-04-27 02:27:19 -0400
committerJay Thomas <degradinglight@gmail.com>2013-04-27 02:27:19 -0400
commit58e1c73deeb78501170f74b68d43721f2079c80e (patch)
treed198170505d137502bae11b3983f9045a9374756 /data
parenta1cb62bab38e6a5545356d885040bc744c2e5605 (diff)
note: skip merging nil keys
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/note.rb b/data/rbot/plugins/note.rb
index 227beaa7..8b6e5272 100644
--- a/data/rbot/plugins/note.rb
+++ b/data/rbot/plugins/note.rb
@@ -14,12 +14,12 @@ class NotePlugin < Plugin
def initialize
super
- return if @registry.nil? or @registry.length < 1
+ return if @registry.length < 1
debug 'Checking registry for old-formatted notes...'
n = 0
@registry.dup.each_key do |key|
unless key == key.downcase
- @registry[key.downcase] = @registry[key] + @registry[key.downcase]
+ @registry[key.downcase] = @registry[key] + (@registry[key.downcase] || [])
@registry.delete key
n += 1
end