mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 15:09:31 +00:00
feat(更换short_id实现方式): 避免因为缩短导致的潜在bug
(cherry picked from commit 6d73a4388c1613dc0a719d68c8b4b3432fefd314)
This commit is contained in:
@@ -38,10 +38,7 @@ function getShortId(uuid) {
|
||||
if (!uuid || uuid.indexOf('-') < 0) {
|
||||
return uuid
|
||||
}
|
||||
// 找到第一个 '-' 的位置
|
||||
const index = uuid.indexOf('-')
|
||||
// 截取从开始到第一个 '-' 之前的部分
|
||||
return uuid.substring(0, index)
|
||||
return uuid.substring(14)
|
||||
}
|
||||
|
||||
module.exports = { extractLangPrefix, extractLangId, getShortId }
|
||||
|
||||
Reference in New Issue
Block a user