mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-21 23:16:48 +00:00
lastEditTime 字段名调整;修改algolia逻辑
This commit is contained in:
@@ -117,7 +117,13 @@ export function deepClone(obj) {
|
||||
if (obj && typeof obj === 'object') {
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
newObj[key] = (obj && typeof obj[key] === 'object') ? deepClone(obj[key]) : obj[key]
|
||||
if (obj[key] instanceof Date) { // 判断属性值是否为 Date 对象
|
||||
newObj[key] = new Date(obj[key].getTime()).toISOString() // 直接拷贝引用
|
||||
} else if (obj[key] && typeof obj[key] === 'object') {
|
||||
newObj[key] = deepClone(obj[key])
|
||||
} else {
|
||||
newObj[key] = obj[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user