mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-09 08:56:10 +00:00
Fix an undefined error
This commit is contained in:
parent
49cc81db8c
commit
7b92499941
@ -33,8 +33,11 @@ function arrayUnique(arr) {
|
|||||||
// Imported from ownCloud contact app
|
// Imported from ownCloud contact app
|
||||||
app.filter('peerColor', function() {
|
app.filter('peerColor', function() {
|
||||||
return function(input) {
|
return function(input) {
|
||||||
|
if (typeof input == 'undefined') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
// Check if core has the new color generator
|
// Check if core has the new color generator
|
||||||
if(typeof input.toHsl === 'function') {
|
if (typeof input.toHsl === 'function') {
|
||||||
var hsl = input.toHsl();
|
var hsl = input.toHsl();
|
||||||
return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)';
|
return 'hsl('+hsl[0]+', '+hsl[1]+'%, '+hsl[2]+'%)';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user