From b003b556cc7af38766de1d76fcff6f0f9d31bc73 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Tue, 8 May 2012 10:25:58 +0100 Subject: [PATCH] MDL-32683 M.util.image_url shouldn't require the component --- lib/javascript-static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 961a2da023e..ae4068b7b2d 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -34,7 +34,7 @@ M.str = M.str || {}; */ M.util.image_url = function(imagename, component) { - if (component == '' || component == 'moodle' || component == 'core') { + if (!component || component == '' || component == 'moodle' || component == 'core') { component = 'core'; }