From 8626fa84d06719a21c9fe024b5fe4d590fc2365f Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Wed, 28 Feb 2024 21:22:42 +0800 Subject: [PATCH] [fix] ignore .DS_Store --- scripts/events/lib/topic_tree.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/events/lib/topic_tree.js b/scripts/events/lib/topic_tree.js index 3647e95..f23e0da 100644 --- a/scripts/events/lib/topic_tree.js +++ b/scripts/events/lib/topic_tree.js @@ -13,6 +13,9 @@ function getTopicTree(ctx) { const data = ctx.locals.get('data') var list = [] for (let key of Object.keys(data)) { + if (key.endsWith('.DS_Store')) { + continue + } if (key.startsWith('topic/') && key.length > 5) { let newKey = key.replace('topic/', '') let obj = data[key]