Skip to content

Commit daa08a9

Browse files
committed
style fixes
1 parent ea95d5c commit daa08a9

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

index.js

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function nodeModulesPaths (start, cb) {
1515
for (var i = parts.length - 1; i >= 0; i--) {
1616
if (parts[i] === 'node_modules') continue;
1717
var dir = path.join.apply(
18-
path, parts.slice(0, i + 1).concat(["node_modules"])
18+
path, parts.slice(0, i + 1).concat(['node_modules'])
1919
);
2020
if (!parts[0].match(/([A-Za-z]:)/)) {
2121
dir = '/' + dir;
@@ -170,27 +170,27 @@ function build_resolve_opts(opts, base) {
170170

171171
var pathFilter = opts.pathFilter;
172172
opts.pathFilter = function(info, path, relativePath) {
173-
if(relativePath[0] != '.') {
174-
relativePath = './' + relativePath;
175-
}
176-
var mappedPath;
177-
if(pathFilter) {
178-
mappedPath = pathFilter.apply(this, arguments);
179-
}
180-
if(mappedPath) {
181-
return mappedPath;
182-
}
173+
if (relativePath[0] != '.') {
174+
relativePath = './' + relativePath;
175+
}
176+
var mappedPath;
177+
if (pathFilter) {
178+
mappedPath = pathFilter.apply(this, arguments);
179+
}
180+
if (mappedPath) {
181+
return mappedPath;
182+
}
183183

184184
var replacements = info[browser];
185-
if(!replacements) {
186-
return;
187-
}
188-
189-
mappedPath = replacements[relativePath];
190-
if(!mappedPath && (relativePath.lastIndexOf(".js") === relativePath.length-3) ) {
191-
mappedPath = replacements[relativePath+".js"];
192-
}
193-
return mappedPath;
185+
if (!replacements) {
186+
return;
187+
}
188+
189+
mappedPath = replacements[relativePath];
190+
if (!mappedPath && (relativePath.lastIndexOf('.js') === relativePath.length - 3)) {
191+
mappedPath = replacements[relativePath + '.js'];
192+
}
193+
return mappedPath;
194194
};
195195

196196
return opts;
@@ -324,4 +324,3 @@ function getReplacements(info, browser) {
324324
}
325325

326326
module.exports = resolve;
327-

0 commit comments

Comments
 (0)