diff options
author | Pytal <24800714+Pytal@users.noreply.github.com> | 2021-08-11 21:18:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 21:18:12 +0300 |
commit | 3edffb5e417a2108ef9f01da03e6f4744a28a8e5 (patch) | |
tree | a0753d76c758004ba76e4f5f79932705bafbb261 | |
parent | f2c4782dabfdc672bb507c3224fc7b46359119c4 (diff) | |
parent | 7d29f4afeb990792ddc34fdc42b4e71c16d19b44 (diff) |
Merge pull request #119 from nextcloud/backport/118/stable22
[stable22] Fix share option being displayed erroneously
-rw-r--r-- | js/files.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/files.js b/js/files.js index d810552..b212288 100644 --- a/js/files.js +++ b/js/files.js @@ -81,8 +81,8 @@ var share = currentFile.find('.filename .fileactions .action-share'); - if (share.length === 0) { - addNewOption('Share', 'shared', t(appName, 'Share ' + (currentFile.attr('data-type') === 'dir' ? 'folder' : 'file')), function () { + if (share.length !== 0) { + addNewOption('Share', 'shared', (currentFile.attr('data-type') === 'dir' ? t(appName, 'Share folder') : t(appName, 'Share file')), function () { share.click(); }); } |