Skip to content

Commit 1e730ea

Browse files
committed
fix utils
1 parent 4c3bf58 commit 1e730ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {encode, decode} from 'uint8-to-base64';
22

33
// transform /path/to/file.ext to file.ext
4-
export function basename(path = '') {
4+
export function basename(path) {
55
const lastSlashIndex = path.lastIndexOf('/');
66
return lastSlashIndex < 0 ? path : path.substring(lastSlashIndex + 1);
77
}
88

99
// transform /path/to/file.ext to .ext
10-
export function extname(path = '') {
10+
export function extname(path) {
1111
const lastSlashIndex = path.lastIndexOf('/');
1212
const lastPointIndex = path.lastIndexOf('.');
1313
if (lastSlashIndex > lastPointIndex) return '';

0 commit comments

Comments
 (0)