projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9783a70
)
Error handling in Member/Panel collection getBy* methods
author
Darren
<darren@darrenwhitlen.com>
Sun, 26 Aug 2012 20:50:46 +0000
(21:50 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Sun, 26 Aug 2012 20:50:46 +0000
(21:50 +0100)
client_backbone/model.js
patch
|
blob
|
blame
|
history
diff --git
a/client_backbone/model.js
b/client_backbone/model.js
index e1eb0bd0fddcb09e3a0e69625b5a303113208b24..9432844761ec2ef1caf8cf72fae2223e5836a496 100644
(file)
--- a/
client_backbone/model.js
+++ b/
client_backbone/model.js
@@
-56,6
+56,7
@@
kiwi.model.MemberList = Backbone.Collection.extend({
},
\r
getByNick: function (nick) {
\r
return this.find(function (m) {
\r
+ if (typeof m !== 'string') return;
\r
return nick.toLowerCase() === m.get('nick').toLowerCase();
\r
});
\r
}
\r
@@
-178,6
+179,7
@@
kiwi.model.PanelList = Backbone.Collection.extend({
},
\r
getByName: function (name) {
\r
return this.find(function (c) {
\r
+ if (typeof c !== 'string') return;
\r
return name.toLowerCase() === c.get('name').toLowerCase();
\r
});
\r
}
\r