diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js b/app/assets/javascripts/filtered_search/filtered_search_manager.js index 178aca0b26aae4b3904416d2c0cb2df703bf56ce..de6482f9c49ada86104ec7eb221a06c1b8cfd458 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js @@ -202,6 +202,8 @@ [].forEach.call(this.tokensContainer.children, (t) => { if (t.classList.contains('js-visual-token')) { + if (this.canEdit && !this.canEdit(t)) return; + removeElements.push(t); } });