Skip to content

Node.js based forum software built for the modern web

broader error handling for empty notif creation return

Julian Lamf2653cd38096
diff --git a/src/flags.js b/src/flags.js
index af63365a2a..7e03e9cffd 100644
--- a/src/flags.js
+++ b/src/flags.js
@@ -453,7 +453,7 @@ Flags.update = function (flagId, uid, changeset, callback) {
nid: 'flags:assign:' + flagId + ':uid:' + assigneeId,
from: uid,
}, function (err, notification) {
- if (err) {
+ if (err || !notification) {
return next(err);
}