Skip to content

Commit e45c677

Browse files
author
TW-IT-Jerry Liu
committed
fix: can not use function before initialize
1 parent 69e7e60 commit e45c677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/src/utils/functions/common.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const filterObjKeys = (
7070
export const isUsingBlockEditor =
7171
typeof window?.wp !== 'undefined' && typeof window?.wp?.blocks !== 'undefined'
7272

73-
export const removeTrailingSlash = (str: string) => {
73+
export function removeTrailingSlash(str: string) {
7474
if (str.endsWith('/')) {
7575
// 如果字符串以斜杠结尾,使用 slice 方法去除最后一个字符
7676

0 commit comments

Comments
 (0)