Skip to content

Commit cc21f4d

Browse files
committed
fix: improve regex formatting in getFileName method
1 parent 04a9eb3 commit cc21f4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/router/history/base.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export class History {
3434
#getFileName(path, ext) {
3535
const [basePath, query] = path.split('?');
3636

37-
const hasValidExt = new RegExp(
38-
`\\.(${ext.replace(/^\./, '')}|html)$`
39-
).test(basePath);
37+
const hasValidExt = new RegExp(`\\.(${ext.replace(/^\./, '')}|html)$`).test(
38+
basePath,
39+
);
4040

4141
const updatedPath = hasValidExt
4242
? basePath

0 commit comments

Comments
 (0)