Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Fixed possible null pointer crash on startup
Browse files Browse the repository at this point in the history
Summary:
Fix for #1964

Changelog: fixed possible crash on startup after updating from a previous Flipper version to 0.77.0

Reviewed By: mweststrate

Differential Revision: D26664846

fbshipit-source-id: 6f9fabeaee8cfe1fa0df11bb57e27d659378a835
  • Loading branch information
nikoant authored and facebook-github-bot committed Feb 25, 2021
1 parent 2253d15 commit 414e907
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions desktop/app/src/reducers/connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,13 +644,13 @@ export function isPluginEnabled(
app: string | null,
pluginId: string,
): boolean {
if (enabledDevicePlugins.has(pluginId)) {
if (enabledDevicePlugins?.has(pluginId)) {
return true;
}
if (!app) {
if (!app || !enabledPlugins) {
return false;
}
const appInfo = deconstructClientId(app);
const starred = enabledPlugins[appInfo.app];
return starred && starred.indexOf(pluginId) > -1;
const enabledAppPlugins = enabledPlugins[appInfo.app];
return enabledAppPlugins && enabledAppPlugins.indexOf(pluginId) > -1;
}

0 comments on commit 414e907

Please sign in to comment.