Browse Source

Do not request when the page seenUser is too many

Sotaro KARASAWA 10 years ago
parent
commit
5a61815caf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      resource/js/crowi.js

+ 1 - 1
resource/js/crowi.js

@@ -537,7 +537,7 @@ $(function() {
 
 
     var $seenUserList = $("#seen-user-list");
     var $seenUserList = $("#seen-user-list");
     var seenUsers = $seenUserList.data('seen-users');
     var seenUsers = $seenUserList.data('seen-users');
-    if (seenUsers && seenUsers.length > 0) {
+    if (seenUsers && seenUsers.length > 0 && seenUsers.length <= 10) {
       // FIXME: user data cache
       // FIXME: user data cache
       $.get('/_api/users.list', {user_ids: seenUsers}, function(res) {
       $.get('/_api/users.list', {user_ids: seenUsers}, function(res) {
         // ignore unless response has error
         // ignore unless response has error