]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix variable definition in sharedialogview.js 4616/head
authorMorris Jobke <hey@morrisjobke.de>
Mon, 1 May 2017 04:32:54 +0000 (01:32 -0300)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 1 May 2017 04:32:54 +0000 (01:32 -0300)
* improves readability of conditional statements
  and fixes warning in JSLint for varibale definition

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
core/js/sharedialogview.js

index 007e13dd366c62c633b6929f8abc193230863910..157887fbb94f9e7707a5a7c384ad1cb34832826e 100644 (file)
                                                var groups  = result.ocs.data.exact.groups.concat(result.ocs.data.groups);
                                                var remotes = result.ocs.data.exact.remotes.concat(result.ocs.data.remotes);
                                                var lookup = result.ocs.data.lookup;
+                                               var emails = [],
+                                                       circles = [];
                                                if (typeof(result.ocs.data.emails) !== 'undefined') {
-                                                       var emails = result.ocs.data.exact.emails.concat(result.ocs.data.emails);
-                                               } else {
-                                                       var emails = [];
+                                                       emails = result.ocs.data.exact.emails.concat(result.ocs.data.emails);
                                                }
                                                if (typeof(result.ocs.data.circles) !== 'undefined') {
-                                                       var circles = result.ocs.data.exact.circles.concat(result.ocs.data.circles);
-                                               } else {
-                                                       var circles = [];
+                                                       circles = result.ocs.data.exact.circles.concat(result.ocs.data.circles);
                                                }
 
                                                var usersLength;
                                                var remotesLength;
                                                var emailsLength;
                                                var circlesLength;
-                                               var lookupLength;
 
                                                var i, j;