var _origAssert = console.assert;


if (typeof window.console === 'undefined') {
    window.console = {};
}

if (typeof console.log === 'undefined') {
    console.log = function() {}
}

/*
 * console.assert may not behave as we'd hope on all implementations.
 * On Chrome, for instance, it doesn't raise an exception. So, fall back
 * to raising one.
 */
console.assert = function(conditional, msg) {
    if (_origAssert && _origAssert.call) {
        _origAssert.call(console, conditional, msg);
    }

    /* If the above assert never raised an exception, raise our own. */
    if (!conditional) {
        throw Error(msg);
    }
}

if (typeof console.assert === 'undefined') {
    console.log = function() {}
}

var _origAssert;

if (typeof window.console === 'undefined') {
    window.console = {};
}

_origAssert = console.assert;

if (typeof console.log === 'undefined') {
    console.log = function() {}
}

/*
 * console.assert may not behave as we'd hope on all implementations.
 * On Chrome, for instance, it doesn't raise an exception. So, fall back
 * to raising one.
 */
console.assert = function(conditional, msg) {
    if (_origAssert && _origAssert.call) {
        _origAssert.call(console, conditional, msg);
    }

    /* If the above assert never raised an exception, raise our own. */
    if (!conditional) {
        throw Error(msg);
    }
}

Fix the console fallbacks to not break older browsers.