fix(#236): insomnia import fix

This commit is contained in:
Anoop M D 2023-09-30 02:24:31 +05:30
parent a849e4fb7b
commit acff0c379e

View File

@ -126,9 +126,7 @@ const parseInsomniaCollection = (data) => {
try {
const insomniaExport = JSON.parse(data);
const insomniaResources = get(insomniaExport, 'resources', []);
const insomniaCollection = insomniaResources.find(
(resource) => resource._type === 'workspace' && resource.scope === 'collection'
);
const insomniaCollection = insomniaResources.find((resource) => resource._type === 'workspace');
if (!insomniaCollection) {
reject(new BrunoError('Collection not found inside Insomnia export'));