diff --git a/assets/javascripts/discourse/helpers/format-unix-date.js b/assets/javascripts/discourse/helpers/format-unix-date.js index 8ff6645..6e06df8 100644 --- a/assets/javascripts/discourse/helpers/format-unix-date.js +++ b/assets/javascripts/discourse/helpers/format-unix-date.js @@ -1,8 +1,7 @@ -import { registerUnbound } from "discourse-common/lib/helpers"; import { autoUpdatingRelativeAge } from "discourse/lib/formatter"; import { htmlSafe } from "@ember/template"; -registerUnbound("format-unix-date", function (timestamp) { +export default function formatUnixDate(timestamp) { if (timestamp) { const date = new Date(moment.unix(timestamp).format()); @@ -14,4 +13,4 @@ registerUnbound("format-unix-date", function (timestamp) { }) ); } -}); +} diff --git a/assets/javascripts/discourse/helpers/user-viewing-self.js b/assets/javascripts/discourse/helpers/user-viewing-self.js index c0fa01d..eda4f44 100644 --- a/assets/javascripts/discourse/helpers/user-viewing-self.js +++ b/assets/javascripts/discourse/helpers/user-viewing-self.js @@ -1,7 +1,6 @@ -import { registerUnbound } from "discourse-common/lib/helpers"; import User from "discourse/models/user"; -export default registerUnbound("user-viewing-self", function (model) { +export default function userViewingSelf(model) { if (User.current()) { return ( User.current().username.toLowerCase() === model.username.toLowerCase() @@ -9,4 +8,4 @@ export default registerUnbound("user-viewing-self", function (model) { } return false; -}); +}