mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
fix build failed on post external slug
This commit is contained in:
@@ -34,7 +34,7 @@ export const memorize = (Component) => {
|
||||
// 转换外链
|
||||
export function sliceUrlFromHttp(str) {
|
||||
// 检查字符串是否包含http
|
||||
if (str.includes('http')) {
|
||||
if (str.includes('http:') || str.includes('https:')) {
|
||||
// 如果包含,找到http的位置
|
||||
const index = str.indexOf('http');
|
||||
// 返回http之后的部分
|
||||
@@ -48,7 +48,7 @@ export function sliceUrlFromHttp(str) {
|
||||
// 检查是否外链
|
||||
export function checkContainHttp(str) {
|
||||
// 检查字符串是否包含http
|
||||
if (str.includes('http')) {
|
||||
if (str.includes('http:') || str.includes('https:')) {
|
||||
// 如果包含,找到http的位置
|
||||
return str.indexOf('http') > -1
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user