Skip to content

Commit 116077a

Browse files
committed
fix tiny bug
1 parent e530f87 commit 116077a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/addons/settings-store.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,3 +521,4 @@ class SettingsStore extends EventTargetShim {
521521
}
522522

523523
export default SettingsStore;
524+
export {isAddonAvailable};

src/addons/settings/settings.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import settingsTranslationsOther from './translations.json';
2626
import upstreamMeta from '../generated/upstream-meta.json';
2727
import {detectLocale} from '../../lib/detect-locale';
2828
import SettingsStore from '../settings-store-singleton';
29+
import {isAddonAvailable} from '../settings-store';
2930
import Channels from '../channels';
3031
import extensionImage from './icons/extension.svg';
3132
import 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
}

0 commit comments

Comments
 (0)