check whether QaApi is defined before accessing it to prevent page load failure
This commit is contained in:
@ -965,7 +965,7 @@ $(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var initializeCodePilot = function() {
|
var initializeCodePilot = function() {
|
||||||
if ($('#questions-column').isPresent() && QaApi.isBrowserSupported()) {
|
if ($('#questions-column').isPresent() && (typeof QaApi != 'undefined') && QaApi.isBrowserSupported()) {
|
||||||
$('#editor-column').addClass('col-md-8').removeClass('col-md-10');
|
$('#editor-column').addClass('col-md-8').removeClass('col-md-10');
|
||||||
$('#questions-column').addClass('col-md-3');
|
$('#questions-column').addClass('col-md-3');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user