FIX: Use correct property for jump-up embedded post link (#13425)

Fixup for 77d33ebe21 #13320 which added the customShare property but did not update all uses
This commit is contained in:
Kane York 2021-06-17 13:17:56 -07:00 committed by GitHub
parent fbfd1fd80b
commit faca5c09fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,4 @@
import DecoratorHelper from "discourse/widgets/decorator-helper";
import DiscourseURL from "discourse/lib/url";
import PostCooked from "discourse/widgets/post-cooked";
import { createWidget } from "discourse/widgets/widget";
import { h } from "virtual-dom";
@ -10,19 +9,15 @@ createWidget("post-link-arrow", {
template: hbs`
{{#if attrs.above}}
<a class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
{{d-icon "arrow-up"}}
</a>
{{else}}
<a class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
{{d-icon "arrow-down"}}
</a>
{{/if}}
`,
click() {
DiscourseURL.routeTo(this.attrs.shareUrl);
},
});
export default createWidget("embedded-post", {
@ -39,7 +34,7 @@ export default createWidget("embedded-post", {
this.attach("poster-name", attrs),
this.attach("post-link-arrow", {
above: state.above,
shareUrl: attrs.shareUrl,
shareUrl: attrs.customShare,
}),
]),
new PostCooked(attrs, new DecoratorHelper(this), this.currentUser),