convert from map to find

This commit is contained in:
Opender Singh 2021-07-02 09:04:06 +12:00
parent b84bb5d6e7
commit 17de9ef556

View File

@ -505,7 +505,7 @@ function showSelectExportTypeModal(onCancel: () => void, onDone: (selectedFormat
},
];
const lastFormat = window.localStorage.getItem('insomnia.lastExportFormat');
const defaultValue = options.map(({ value }) => value).includes(lastFormat) ? lastFormat : VALUE_JSON;
const defaultValue = options.find(({ value }) => value === lastFormat ) ? lastFormat : VALUE_JSON;
showModal(SelectModal, {
title: 'Select Export Type',