examples/webpack/dist/app.e100c23eefa4ef71b346.js
function (prototype) {
        // if the prototype is ZoneAwareError.prototype
        // we just return the prebuilt errorProperties.
        if (prototype === ZoneAwareError.prototype) {
            return errorProperties;
        }
        var newProps = Object.create(null);
        var cKeys = Object.getOwnPropertyNames(errorProperties);
        var keys = Object.getOwnPropertyNames(prototype);
        cKeys.forEach(function (cKey) {
            if (keys.filter(function (key) {
                return key === cKey;
            })
                .length === 0) {
                newProps[cKey] = errorProperties[cKey];
            }
        });
        return newProps;
    }
function (prototype) {
        // if the prototype is ZoneAwareError.prototype
        // we just return the prebuilt errorProperties.
        if (prototype === ZoneAwareError.prototype) {
            return errorProperties;
        }
        var newProps = Object.create(null);
        var cKeys = Object.getOwnPropertyNames(errorProperties);
        var keys = Object.getOwnPropertyNames(prototype);
        cKeys.forEach(function (cKey) {
            if (keys.filter(function (key) {
                return key === cKey;
            })
                .length === 0) {
                newProps[cKey] = errorProperties[cKey];
            }
        });
        return newProps;
    }
function ( prototype ) { // if the prototype is ZoneAwareError.prototype // we just return the prebuilt errorProperties. if ( prototype === ZoneAwareError . prototype ) { return errorProperties ; } var newProps = Object . create ( null ) ; var cKeys = Object . getOwnPropertyNames ( errorProperties ) ; var keys = Object . getOwnPropertyNames ( prototype ) ; cKeys . forEach ( function ( cKey ) { if ( keys . filter ( function ( key ) { return key === cKey ; } ) . length === 0 ) { newProps [ cKey ] = errorProperties [ cKey ] ; } } ) ; return newProps ; }
for derived Error class which extends ZoneAwareError we should not override the derived class's property so we create a new props object only copy the properties from errorProperties which not exist in derived Error's prototype
for derived Error class which extends ZoneAwareError we should not override the derived class s property so we create a new props object only copy the properties from errorProperties which not exist in derived Error s prototype