mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
Wordlist is undefined
This commit is contained in:
+5
-2
@@ -1,5 +1,6 @@
|
||||
const errors = require('../errors');
|
||||
/* eslint eqeqeq: ["error", "smart"]*/
|
||||
|
||||
const errors = require('../errors');
|
||||
const Action = require('../models/action');
|
||||
const Asset = require('../models/asset');
|
||||
const Comment = require('../models/comment');
|
||||
@@ -118,7 +119,9 @@ const createPublicComment = (context, commentInput) => {
|
||||
// If the comment was flagged as being suspect, we need to add a
|
||||
// flag to it to indicate that it needs to be looked at.
|
||||
// Otherwise just return the new comment.
|
||||
if (wordlist !== null && wordlist.suspect) {
|
||||
|
||||
// TODO: Check why the wordlist is undefined
|
||||
if (wordlist != null) {
|
||||
|
||||
// TODO: this is kind of fragile, we should refactor this to resolve
|
||||
// all these const's that we're using like 'comments', 'flag' to be
|
||||
|
||||
Reference in New Issue
Block a user