diff options
Diffstat (limited to 'src/core/contact.js')
-rw-r--r-- | src/core/contact.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/contact.js b/src/core/contact.js index 51985a3..0f56ca9 100644 --- a/src/core/contact.js +++ b/src/core/contact.js @@ -113,7 +113,12 @@ Candy.Core.Contact.prototype.getStatus = function() { highestResourcePriority; $.each(this.data.resources, function(resource, obj) { - var resourcePriority = parseInt(obj.priority, 10); + var resourcePriority; + if (obj.priority === undefined || obj.priority === '') { + resourcePriority = 0; + } else { + resourcePriority = parseInt(obj.priority, 10); + } if (obj.show === '' || obj.show === null || obj.show === undefined) { // TODO: Submit this as a bugfix to strophejs-plugins' roster plugin |