mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
notifications: fix tests
This commit is contained in:
@@ -71,6 +71,8 @@ export let schema = new Schema({
|
|||||||
* is fixed
|
* is fixed
|
||||||
*/
|
*/
|
||||||
schema.statics.convertNotificationsToSafeJson = function convertNotificationsToSafeJson (notifications) {
|
schema.statics.convertNotificationsToSafeJson = function convertNotificationsToSafeJson (notifications) {
|
||||||
|
if (!notifications) return notifications;
|
||||||
|
|
||||||
return notifications.filter(n => {
|
return notifications.filter(n => {
|
||||||
// Exclude notifications with a nullish value
|
// Exclude notifications with a nullish value
|
||||||
if (!n) return false;
|
if (!n) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user