mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:43:37 +08:00
FIX: Notifications when no limit is provided
This commit is contained in:
parent
4a6f617f4d
commit
73dba5af38
|
@ -8,7 +8,7 @@ class NotificationsController < ApplicationController
|
|||
user = current_user
|
||||
if params[:recent].present?
|
||||
|
||||
limit = params[:limit].to_i || 15
|
||||
limit = (params[:limit] || 15).to_i
|
||||
limit = 50 if limit > 50
|
||||
|
||||
notifications = Notification.recent_report(current_user, limit)
|
||||
|
|
Loading…
Reference in New Issue
Block a user