Fix getActiveNotifications crash

Reviewed By: danielbuechele

Differential Revision: D15822750

fbshipit-source-id: 1f8f41437db842197e6ab74e0559a710f80ff786
This commit is contained in:
Pascal Hartig
2019-06-14 08:57:36 -07:00
committed by Facebook Github Bot
parent 61365662f6
commit 0eca3ac1e1

View File

@@ -193,8 +193,8 @@ export default class extends FlipperPlugin<PluginState, *, PersistedState> {
};
static getActiveNotifications = ({
closeableReferenceLeaks,
isLeakTrackingEnabled,
closeableReferenceLeaks = [],
isLeakTrackingEnabled = false,
}: PersistedState): Array<Notification> =>
closeableReferenceLeaks
.filter(_ => isLeakTrackingEnabled)