From 7b924999411e5ad46358a8d735225fa4c48bd9fd Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Mon, 19 Sep 2016 22:45:06 +0200 Subject: [PATCH] Fix an undefined error --- js/public/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/public/app.js b/js/public/app.js index 0b22cac..3efa559 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -33,8 +33,11 @@ function arrayUnique(arr) { // Imported from ownCloud contact app app.filter('peerColor', function() { return function(input) { + if (typeof input == 'undefined') { + return ''; + } // Check if core has the new color generator - if(typeof input.toHsl === 'function') { + if (typeof input.toHsl === 'function') { var hsl = input.toHsl(); return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)'; } else {