js/utils.js
// this is why I hate js, no null safety
this is why I hate js, no null safety
this is why I hate js no null safety
function null_safe_get(obj, chain) {
    return chain.split('.').reduce(function(accumulator, link) {
        if (accumulator === undefined || accumulator === null) {
            return;
        }
        return accumulator[link];
    }, obj);
}
function null_safe_get ( obj , chain ) { return chain . split ( '.' ) . reduce ( function ( accumulator , link ) { if ( accumulator === undefined || accumulator === null ) { return ; } return accumulator [ link ] ; } , obj ) ; }
this is why I hate js, no null safety
this is why I hate js no null safety