summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2022-10-27 22:05:23 +0200
committerjulian laplace <julescarbon@gmail.com>2022-10-27 22:05:23 +0200
commiteea34be30711fc9de9a65dce772b0f8b42541f9c (patch)
tree9c5e80aa7f3f8881c8de2d12f1806d59e1e14372
parent35b9318fbf27f4025dd50be2c0a59046dfab3baf (diff)
fix dot
-rw-r--r--public/assets/js/lib/views/stream/hootfilters.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/public/assets/js/lib/views/stream/hootfilters.js b/public/assets/js/lib/views/stream/hootfilters.js
index 68f0cdd..43920c3 100644
--- a/public/assets/js/lib/views/stream/hootfilters.js
+++ b/public/assets/js/lib/views/stream/hootfilters.js
@@ -65,8 +65,8 @@ var HootFilters = View.extend({
this.$music.closest("label").toggle(music);
this.$hoots.closest("label").toggle(hoots);
this.$files.closest("label").toggle(normal_files);
+ let classicHref, classicText, editText, editHref;
if (target.thread || target.keyword || target.username) {
- let classicHref, classicText, editText, editHref;
if (target.thread) {
editHref = `/details/${target.thread}/settings`;
classicHref = `/details/${target.thread}`;
@@ -81,12 +81,14 @@ var HootFilters = View.extend({
classicHref = `/profile/${target.username}`;
classicText = "profile";
}
- if (editHref) {
- this.$editLink.show();
- this.$editLink.find("a").attr("href", editHref).html(editText);
- } else {
- this.$editLink.hide();
- }
+ }
+ if (editHref && editText) {
+ this.$editLink.show();
+ this.$editLink.find("a").attr("href", editHref).html(editText);
+ } else {
+ this.$editLink.hide();
+ }
+ if (classicHref && classicText) {
this.$classicLink.show();
this.$classicLink.find("a").attr("href", classicHref).html(classicText);
} else {