mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-21 12:33:34 +02:00
fix(#236): insomnia import fix
This commit is contained in:
parent
a849e4fb7b
commit
acff0c379e
@ -126,9 +126,7 @@ const parseInsomniaCollection = (data) => {
|
|||||||
try {
|
try {
|
||||||
const insomniaExport = JSON.parse(data);
|
const insomniaExport = JSON.parse(data);
|
||||||
const insomniaResources = get(insomniaExport, 'resources', []);
|
const insomniaResources = get(insomniaExport, 'resources', []);
|
||||||
const insomniaCollection = insomniaResources.find(
|
const insomniaCollection = insomniaResources.find((resource) => resource._type === 'workspace');
|
||||||
(resource) => resource._type === 'workspace' && resource.scope === 'collection'
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!insomniaCollection) {
|
if (!insomniaCollection) {
|
||||||
reject(new BrunoError('Collection not found inside Insomnia export'));
|
reject(new BrunoError('Collection not found inside Insomnia export'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user