Fix fresco fetch bug
Summary: Before this diff the "getAllImageData" wasn't triggered as the it used to early exit, because persistedState was not null. That check was unnecessary and not needed. Reviewed By: jknoxville Differential Revision: D16377134 fbshipit-source-id: 61ee49fbd908733798086206a82e38890ecd0af6
This commit is contained in:
committed by
Facebook Github Bot
parent
e8a8f87086
commit
0c0f0d4a90
@@ -97,9 +97,6 @@ export default class extends FlipperPlugin<PluginState, *, PersistedState> {
|
||||
persistedState: ?PersistedState,
|
||||
store: ?MiddlewareAPI,
|
||||
): Promise<?PersistedState> => {
|
||||
if (persistedState) {
|
||||
return Promise.resolve(persistedState);
|
||||
}
|
||||
const defaultPromise = Promise.resolve(persistedState);
|
||||
if (!store) {
|
||||
return defaultPromise;
|
||||
@@ -110,8 +107,10 @@ export default class extends FlipperPlugin<PluginState, *, PersistedState> {
|
||||
}
|
||||
const {levels, events, imageDataList} = data;
|
||||
let pluginData: PersistedState = {
|
||||
...FlipperPlugin.defaultPersistedState,
|
||||
images: [...levels.levels],
|
||||
...persistedState,
|
||||
images: persistedState
|
||||
? [...persistedState.images, ...levels.levels]
|
||||
: levels.levels,
|
||||
closeableReferenceLeaks:
|
||||
(persistedState && persistedState.closeableReferenceLeaks) || [],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user