@@ -77,7 +77,7 @@ function find_shims_in_package(pkgJson, cur_path, shims, browser) {
77
77
function load_shims ( paths , browser , cb ) {
78
78
// identify if our file should be replaced per the browser field
79
79
// original filename|id -> replacement
80
- var shims = { } ;
80
+ var shims = Object . create ( null ) ;
81
81
82
82
( function next ( ) {
83
83
var cur_path = paths . shift ( ) ;
@@ -113,7 +113,7 @@ function load_shims(paths, browser, cb) {
113
113
function load_shims_sync ( paths , browser ) {
114
114
// identify if our file should be replaced per the browser field
115
115
// original filename|id -> replacement
116
- var shims = { } ;
116
+ var shims = Object . create ( null ) ;
117
117
var cur_path ;
118
118
119
119
while ( cur_path = paths . shift ( ) ) {
@@ -239,7 +239,7 @@ function resolve(id, opts, cb) {
239
239
id = shims [ id ] ;
240
240
}
241
241
242
- var modules = opts . modules || { } ;
242
+ var modules = opts . modules || Object . create ( null ) ;
243
243
var shim_path = modules [ id ] ;
244
244
if ( shim_path ) {
245
245
return cb ( null , shim_path ) ;
@@ -295,7 +295,7 @@ resolve.sync = function (id, opts) {
295
295
id = shims [ id ] ;
296
296
}
297
297
298
- var modules = opts . modules || { } ;
298
+ var modules = opts . modules || Object . create ( null ) ;
299
299
var shim_path = modules [ id ] ;
300
300
if ( shim_path ) {
301
301
return shim_path ;
0 commit comments