Skip to content

Commit

Permalink
Update event-label.js
Browse files Browse the repository at this point in the history
Removed registerUnbound
  • Loading branch information
bluefroguk1 authored May 24, 2024
1 parent 568988f commit 4962bd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/javascripts/discourse/helpers/event-label.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { helperContext, registerUnbound } from "discourse-common/lib/helpers";
import { helper } from '@ember/component/helper';
import { helperContext } from "discourse-common/lib/helpers";
import { htmlSafe } from "@ember/template";
import { eventLabel } from "../lib/date-utilities";

export default registerUnbound("event-label", function (event, args) {
export default helper(function eventLabelHelper([event], args) {
let siteSettings = helperContext().siteSettings;
return htmlSafe(eventLabel(event, Object.assign({}, args, { siteSettings })));
});

0 comments on commit 4962bd6

Please sign in to comment.