Skip to content

Commit

Permalink
Fix clearing the label of a share
Browse files Browse the repository at this point in the history
When the label is being edited its value is stored in "newLabel", and
the original label is shown only if "newLabel" is not set. However, as
it was checked against any falsy value instead of only undefined when
the label was cleared and thus it has an empty value the original label
was shown instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
  • Loading branch information
danxuliu authored and npmbuildbot-nextcloud[bot] committed Jan 8, 2021
1 parent d6d8fc4 commit fb19d4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
:class="{ error: errors.label }"
:disabled="saving"
:aria-label="t('files_sharing', 'Share label')"
:value="share.newLabel || share.label"
:value="share.newLabel !== undefined ? share.newLabel : share.label"
icon="icon-edit"
maxlength="255"
@update:value="onLabelChange"
Expand Down

0 comments on commit fb19d4a

Please sign in to comment.