From 80660bdc071632f699ea2051d56f03cc887948e6 Mon Sep 17 00:00:00 2001
From: Michael Gapczynski <GapczynskiM@gmail.com>
Date: Wed, 10 Aug 2011 13:38:58 -0400
Subject: [PATCH] Fix shared list for files inside of shared folders

---
 apps/files_sharing/js/share.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 3834ebbf83..fed85b35b5 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -161,8 +161,7 @@ function createShareDropdown(filenames, files) {
 			var list;
 			$.each(users, function(index, row) {
 				$('#uid_shared_with option[value="'+row.uid_shared_with+'"]').remove();
-				if (typeof(index) == 'string') {
-					// TODO typeof not always working, group together users that have parent folders shared with them
+				if (isNaN(index)) {
 					list += "<li>Parent folder "+index.substr(0, index.lastIndexOf('-'))+" shared with "+row.uid_shared_with+"</li>";
 				} else {
 					list += "<li data-uid_shared_with='"+row.uid_shared_with+"'>";
-- 
GitLab