@@ -41,7 +41,7 @@ defaults._set('global', {
4141 * returns a deep copy of the result, thus doesn't alter inputs.
4242 */
4343function mergeScaleConfig ( /* config objects ... */ ) {
44- return helpers . merge ( { } , [ ] . slice . call ( arguments ) , {
44+ return helpers . merge ( Object . create ( null ) , [ ] . slice . call ( arguments ) , {
4545 merger : function ( key , target , source , options ) {
4646 if ( key === 'xAxes' || key === 'yAxes' ) {
4747 var slen = source [ key ] . length ;
@@ -81,9 +81,9 @@ function mergeScaleConfig(/* config objects ... */) {
8181 * a deep copy of the result, thus doesn't alter inputs.
8282 */
8383function mergeConfig ( /* config objects ... */ ) {
84- return helpers . merge ( { } , [ ] . slice . call ( arguments ) , {
84+ return helpers . merge ( Object . create ( null ) , [ ] . slice . call ( arguments ) , {
8585 merger : function ( key , target , source , options ) {
86- var tval = target [ key ] || { } ;
86+ var tval = target [ key ] || Object . create ( null ) ;
8787 var sval = source [ key ] ;
8888
8989 if ( key === 'scales' ) {
@@ -100,7 +100,7 @@ function mergeConfig(/* config objects ... */) {
100100}
101101
102102function initConfig ( config ) {
103- config = config || { } ;
103+ config = config || Object . create ( null ) ;
104104
105105 // Do NOT use mergeConfig for the data object because this method merges arrays
106106 // and so would change references to labels and datasets, preventing data updates.
0 commit comments