diff --git a/js/src/local-fixes.js b/js/src/local-fixes.js index 877faaa..e786e78 100644 --- a/js/src/local-fixes.js +++ b/js/src/local-fixes.js @@ -162,7 +162,7 @@ function fix_pilot_fallback_link($, resp) { var url = $link.attr('href'); var m_inst = url ? url.match(/-pilot-fallback-for-(\w+)/) : null; var inst_code = m_inst ? m_inst[ 1 ] : null; - var fallback = resp.config.fallback_for; + var fallback = resp.config.fallback_for || {}; var fallback_url = fallback[ inst_code ] || null; $msg.addClass('alert alert-info'); diff --git a/js/src/ouop-utils.js b/js/src/ouop-utils.js index 03814de..4098130 100644 --- a/js/src/ouop-utils.js +++ b/js/src/ouop-utils.js @@ -79,5 +79,5 @@ function replace_object (str, mapObj) { function alert (msg, id, cls) { return ''; + (msg ? msg.replace(/href=/g, 'class="alert-link" href=') : 'no-msg') + ''; }