diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-05-01 01:32:54 -0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-05-01 01:32:54 -0300 |
commit | 23858504eb8afdb070d93c7d3e027775754ca040 (patch) | |
tree | c37ef0d1a8e4bf5728eba8368802e75bc44176d5 /core/js | |
parent | 2152d5f1f610a40539f11e91318ab27c54400ef3 (diff) | |
download | nextcloud-server-23858504eb8afdb070d93c7d3e027775754ca040.tar.gz nextcloud-server-23858504eb8afdb070d93c7d3e027775754ca040.zip |
Fix variable definition in sharedialogview.js
* improves readability of conditional statements
and fixes warning in JSLint for varibale definition
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/sharedialogview.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 007e13dd366..157887fbb94 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -183,15 +183,13 @@ 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; @@ -199,7 +197,6 @@ var remotesLength; var emailsLength; var circlesLength; - var lookupLength; var i, j; |