diff --git a/src/plugins/network/index.js b/src/plugins/network/index.js index f4c20a93e..97d2a98f4 100644 --- a/src/plugins/network/index.js +++ b/src/plugins/network/index.js @@ -116,8 +116,11 @@ export default class extends FlipperPlugin { static id = 'Network'; static icon = 'internet'; static keyboardActions = ['clear']; - static subscribed = []; + static defaultPersistedState = { + requests: {}, + responses: {}, + }; static persistedStateReducer = ( persistedState: PersistedState, @@ -127,16 +130,10 @@ export default class extends FlipperPlugin { const dataType: 'requests' | 'responses' = data.url ? 'requests' : 'responses'; - if (persistedState) { - return { - [dataType]: { - ...persistedState[dataType], - [data.id]: data, - }, - }; - } return { + ...persistedState, [dataType]: { + ...persistedState[dataType], [data.id]: data, }, };