Skip to content

Commit 92a98b1

Browse files
committed
refactor
1 parent bd5fe68 commit 92a98b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/config-array/src/config-array.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,11 @@ function normalizeConfigPatterns(config, namespacedBasePath, path) {
292292
return config;
293293
}
294294

295+
const hasBasePath = typeof config.basePath === "string";
296+
295297
let needsNormalization = false;
296298

297-
if (typeof config.basePath === "string") {
299+
if (hasBasePath) {
298300
needsNormalization = true;
299301
}
300302

@@ -317,7 +319,7 @@ function normalizeConfigPatterns(config, namespacedBasePath, path) {
317319

318320
const newConfig = { ...config };
319321

320-
if (typeof config.basePath === "string") {
322+
if (hasBasePath) {
321323
if (path.isAbsolute(config.basePath)) {
322324
newConfig.basePath = path.toNamespacedPath(config.basePath);
323325
} else {

0 commit comments

Comments
 (0)