Fixed possible null pointer crash on startup
Summary: Fix for https://github.com/facebook/flipper/issues/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2253d158f3
commit
414e90730b
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user