Skip to content

Commit 07a33b4

Browse files
committed
fix: use slice instead of substr(deprecated)
1 parent bfadc37 commit 07a33b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import {
77
} from "./types";
88

99
export const idToUuid = (path: string) =>
10-
`${path.substr(0, 8)}-${path.substr(8, 4)}-${path.substr(
10+
`${path.slice(0, 8)}-${path.slice(8, 4)}-${path.slice(
1111
12,
1212
4
13-
)}-${path.substr(16, 4)}-${path.substr(20)}`;
13+
)}-${path.slice(16, 4)}-${path.slice(20)}`;
1414

1515
export const parsePageId = (id: string) => {
1616
if (id) {

0 commit comments

Comments
 (0)