Fix issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-11-11 12:53:11 +01:00
committed by Julius Härtl
parent afec4f211c
commit abc039a634
8 changed files with 22 additions and 13 deletions

View File

@@ -22,10 +22,14 @@
app.filter('orderObjectBy', function(){
return function(input, attribute) {
if (!angular.isObject(input)) {return input;}
if (!angular.isObject(input)) {
return input;
}
var array = [];
for(var objectKey in input) {
array.push(input[objectKey]);
if ({}.hasOwnProperty.call(input, objectKey)) {
array.push(input[objectKey]);
}
}
array.sort(function(a, b){

View File

@@ -37,7 +37,7 @@ app.filter('textColorFilter', function () {
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h, s, l = (max + min) / 2;
if (max == min) {
if (max === min) {
h = s = 0; // achromatic
} else {
var d = max - min;