From ad71775ae8d38bb7eb289a647e813ddcf1116cfc Mon Sep 17 00:00:00 2001
From: FuXiaoHei <fuxiaohei@hexiaz.com>
Date: Thu, 1 May 2014 23:31:35 +0800
Subject: [PATCH] fix collaboration js bug

---
 public/js/app.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public/js/app.js b/public/js/app.js
index 7d70b7fec..59fffd36d 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -597,7 +597,7 @@ function initRepoSetting() {
             url: '/api/v1/users/search?q=' + $this.val(),
             dataType: "json",
             success: function (json) {
-                if (json.ok && json.data) {
+                if (json.ok && json.data.length) {
                     var html = '';
                     $.each(json.data, function (i, item) {
                         html += '<li><img src="' + item.avatar + '">' + item.username + '</li>';