core: optional host field

This commit is contained in:
undefined committed 2023-05-05 01:11:21 +08:00
1 parent 9c4df49949
commit c37dfd6df1
1 file changed
+1 -1
+1 -1
View File
@@ -298,7 +298,7 @@ bus.on('ready', () => Promise.all([
bus.on('domain/delete-cache', async (domainId: string) => {
const ddoc = await DomainModel.get(domainId);
if (!ddoc) return;
for (const host of ddoc.hosts) {
for (const host of ddoc.hosts || []) {
cache.delete(`host::${host}`);
}
cache.delete(`id::${domainId}`);