From a7ea1a0c46e95d25fbf9e13a0f8223148850dc5b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 23 May 2015 14:23:23 +0530 Subject: [PATCH] Ox.formatResolution: return empty string if array is undefined --- source/Ox/js/Format.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index 77a66378..b55485a4 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -559,9 +559,9 @@ Ox.formatDimensions Formats valus as dimension "1,920 × 1,080 px" @*/ Ox.formatDimensions = Ox.formatResolution = function(array, string) { - return array.map(function(value) { + return array ? array.map(function(value) { return Ox.formatNumber(value); - }).join(' × ') + (string ? ' ' + string : ''); + }).join(' × ') + (string ? ' ' + string : '') : ''; }; /*@