File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -521,3 +521,4 @@ class SettingsStore extends EventTargetShim {
521521}
522522
523523export default SettingsStore ;
524+ export { isAddonAvailable } ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import settingsTranslationsOther from './translations.json';
2626import upstreamMeta from '../generated/upstream-meta.json' ;
2727import { detectLocale } from '../../lib/detect-locale' ;
2828import SettingsStore from '../settings-store-singleton' ;
29+ import { isAddonAvailable } from '../settings-store' ;
2930import Channels from '../channels' ;
3031import extensionImage from './icons/extension.svg' ;
3132import brushImage from './icons/brush.svg' ;
@@ -78,6 +79,9 @@ const filterAddonsBySupport = () => {
7879 const supported = { } ;
7980 const unsupported = { } ;
8081 for ( const [ id , manifest ] of Object . entries ( importedAddons ) ) {
82+ if ( ! isAddonAvailable ( id ) ) {
83+ continue ;
84+ }
8185 if ( manifest . unsupported ) {
8286 unsupported [ id ] = manifest ;
8387 } else {
@@ -129,7 +133,7 @@ const getInitialSearch = () => {
129133
130134 // If the query is an addon ID, it's a better user experience to show the name of the addon
131135 // in the search bar instead of a ID they won't understand.
132- if ( Object . prototype . hasOwnProperty . call ( importedAddons , hash ) ) {
136+ if ( Object . prototype . hasOwnProperty . call ( importedAddons , hash ) && isAddonAvailable ( hash ) ) {
133137 const manifest = importedAddons [ hash ] ;
134138 return addonTranslations [ `${ hash } /@name` ] || manifest . name ;
135139 }
You can’t perform that action at this time.
0 commit comments