[fix] ignore .DS_Store

This commit is contained in:
xaoxuu 2024-02-28 21:22:42 +08:00
parent 8f61d81eef
commit 8626fa84d0
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,9 @@ function getTopicTree(ctx) {
const data = ctx.locals.get('data') const data = ctx.locals.get('data')
var list = [] var list = []
for (let key of Object.keys(data)) { for (let key of Object.keys(data)) {
if (key.endsWith('.DS_Store')) {
continue
}
if (key.startsWith('topic/') && key.length > 5) { if (key.startsWith('topic/') && key.length > 5) {
let newKey = key.replace('topic/', '') let newKey = key.replace('topic/', '')
let obj = data[key] let obj = data[key]