diff --git a/system/scripts/hooks.js b/system/scripts/hooks.js
index a8f5e24..11e5327 100644
--- a/system/scripts/hooks.js
+++ b/system/scripts/hooks.js
@@ -442,19 +442,18 @@ export default class HooksL5r5e {
});
// If gm add a extra button to easily filter the content to see the same stuff as a player
- if(game.user.isGM) {
- if(unavailableSourceForPlayers.length > 0) {
- const buttonHTML = `'
+ if (game.user.isGM && unavailableSourceForPlayers.length > 0) {
+ const buttonHTML = `'
- const filterPlayerView = game.settings.get(CONFIG.l5r5e.namespace, "all-compendium-references")
- .filter((item) => !unavailableSourceForPlayers.includes(item))
- .filter((item) => sources_in_this_compendium.has(item));
- $(buttonHTML).appendTo($(header).find("l5r5e-multi-select")).click(function() {
- header.find("l5r5e-multi-select")[0].value = filterPlayerView;
- });
- }
+ const filterPlayerView = game.settings.get(CONFIG.l5r5e.namespace, "all-compendium-references")
+ .filter((item) => !unavailableSourceForPlayers.includes(item))
+ .filter((item) => sources_in_this_compendium.has(item));
+
+ $(buttonHTML).appendTo($(header).find("l5r5e-multi-select")).click(function() {
+ header.find("l5r5e-multi-select")[0].value = filterPlayerView;
+ });
}
}