Fixes small bugs

+ With MDNLinks and bonfireExecute being run on step challenges.
+ Return when common isn't loaded in reBindModals instead of throwing.
This commit is contained in:
Logan Tegman
2015-11-07 12:54:58 -08:00
parent 2ed6143c68
commit 2667b574bf
4 changed files with 4 additions and 4 deletions

View File

@ -252,7 +252,7 @@ $(document).ready(function() {
function reBindModals() {
if (!window.common) {
throw new Error('common framework should be loaded.');
return;
}
var common = window.common;

View File

@ -135,6 +135,6 @@ block content
}
});
if (!{JSON.stringify(MDNlinks.length)}) {
if (!!{JSON.stringify(MDNlinks.length)}) {
$('#MDN-links').addClass('collapse');
}

View File

@ -101,7 +101,7 @@ block content
include ../partials/challenge-footer
script.
if (!{JSON.stringify(MDNlinks.length)}) {
if (!!{JSON.stringify(MDNlinks.length)}) {
$('#MDN-links').addClass('collapse');
}
document.addEventListener('gitter-sidecar-ready', function(e) {

View File

@ -39,7 +39,7 @@ block content
common.challengeId = !{JSON.stringify(challengeId)};
common.challengeName = !{JSON.stringify(name)};
common.challengeType = 7;
common.challengeType = !{JSON.stringify(challengeType)};
common.dashedName = !{JSON.stringify(dashedName || '')};
common.isHonest = !{JSON.stringify(isHonest || false)};
common.isFrontEndCert = !{JSON.stringify(isFrontEndCert || false)};