Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: words is undefined when filter empty
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Jul 1, 2023
1 parent 4a03a3d commit 5396d4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/database/cleanFilter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = async function cleanChannels() {
const schema = require("../../models/filterSchema");

let autobanData = await schema.findOne({ _id: "autoban" });
let blockData = await schema.findOne({ _id: "block" });
let autobanData = await schema.findOne({ _id: "autoban" }) || { words: [] };
let blockData = await schema.findOne({ _id: "block" }) || { words: [] };

const promises = [];

Expand Down

0 comments on commit 5396d4a

Please sign in to comment.