diff --git a/lib/util.js b/lib/util.js index c716c9d..afd599d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -62,17 +62,13 @@ var can_define_prop = ( function() * * @return {Object} object passed to function */ -exports.freeze = function( obj ) -{ - // if freezing is not supported (ES5), do nothing - if ( Object.freeze === undefined ) +exports.freeze = ( typeof Object.freeze === 'function' ) + ? Object.freeze + : function( obj ) { return; } - - Object.freeze( obj ); - return obj; -}; +; /**