Ox.formatResolution: return empty string if array is undefined

This commit is contained in:
j 2015-05-23 14:23:23 +05:30
parent 3ed5da882f
commit a7ea1a0c46

View file

@ -559,9 +559,9 @@ Ox.formatDimensions <f> Formats valus as dimension
"1,920 × 1,080 px" "1,920 × 1,080 px"
@*/ @*/
Ox.formatDimensions = Ox.formatResolution = function(array, string) { Ox.formatDimensions = Ox.formatResolution = function(array, string) {
return array.map(function(value) { return array ? array.map(function(value) {
return Ox.formatNumber(value); return Ox.formatNumber(value);
}).join(' × ') + (string ? ' ' + string : ''); }).join(' × ') + (string ? ' ' + string : '') : '';
}; };
/*@ /*@