FIX: Don't error when clicking on a custom link in community section (#22174)

This commit is contained in:
Osama Sayegh 2023-06-20 11:35:33 +03:00 committed by GitHub
parent fc199d42fa
commit cee15d4177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View File

@ -17,11 +17,15 @@
@prefixValue={{link.prefixValue}}
@href={{link.value}}
@class={{link.linkDragCss}}
{{draggable
{{(if
this.section.reorderable
(modifier
"draggable"
didStartDrag=link.didStartDrag
didEndDrag=link.didEndDrag
dragMove=link.dragMove
}}
)
)}}
/>
{{else}}
<Sidebar::SectionLink
@ -43,7 +47,7 @@
@currentWhen={{link.currentWhen}}
@class={{link.linkDragCss}}
{{(if
link.didStartDrag
this.section.reorderable
(modifier
"draggable"
didStartDrag=link.didStartDrag

View File

@ -44,6 +44,8 @@ export default class CommunitySection {
@tracked links;
@tracked moreLinks;
reorderable = false;
constructor({ section, owner }) {
setOwner(this, owner);

View File

@ -14,6 +14,8 @@ export default class Section {
@tracked dragCss;
@tracked links;
reorderable = true;
constructor({ section, owner }) {
setOwner(this, owner);