Skip to content

Commit

Permalink
remove console logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pfaffman committed Dec 14, 2023
1 parent edf6204 commit e3bd122
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions javascripts/discourse/initializers/custom-homepage-set.js.es6
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import PreloadStore from "discourse/lib/preload-store";

export default {
name: "discourse-custom-homepage",
initialize(container) {
initialize() {
withPluginApi("0.11.4", (api) => {
const router = container.lookup("router:main");
// const router = container.lookup("router:main");
const user = api.getCurrentUser();
const { setDefaultHomepage } = require("discourse/lib/utilities");

window.console.log("checking default");

if (settings.custom_default_homepage) {

Check failure on line 13 in javascripts/discourse/initializers/custom-homepage-set.js.es6

View workflow job for this annotation

GitHub Actions / ci / linting

'settings' is not defined
const url = settings.custom_default_homepage.replace(/^\/+/g, '');

Check failure on line 14 in javascripts/discourse/initializers/custom-homepage-set.js.es6

View workflow job for this annotation

GitHub Actions / ci / linting

'settings' is not defined
setDefaultHomepage(url);
Expand All @@ -32,7 +30,7 @@ export default {

if (user) {
if (user.primary_group_name && settings.group_page_map) {

Check failure on line 32 in javascripts/discourse/initializers/custom-homepage-set.js.es6

View workflow job for this annotation

GitHub Actions / ci / linting

'settings' is not defined
var groupMap = settings.group_page_map.replace(",", ":").split("|");
let groupMap = settings.group_page_map.replace(",", ":").split("|");

Check failure on line 33 in javascripts/discourse/initializers/custom-homepage-set.js.es6

View workflow job for this annotation

GitHub Actions / ci / linting

'settings' is not defined
const mapEntry = groupMap.find((value) =>
RegExp(user.primary_group_name).test(value)
);
Expand Down

0 comments on commit e3bd122

Please sign in to comment.