mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
fix invariant exception (#6410)
This commit is contained in:
parent
98e292d800
commit
a35e99bacf
@ -967,7 +967,7 @@ export const reorderCollectionAction: ActionFunction = async ({ request, params
|
||||
invariant(typeof id === 'string', 'ID is required');
|
||||
invariant(typeof targetId === 'string', 'Target ID is required');
|
||||
invariant(typeof dropPosition === 'string', 'Drop position is required');
|
||||
invariant(metaSortKey, 'MetaSortKey position is required');
|
||||
invariant(typeof metaSortKey === 'number', 'MetaSortKey position is required');
|
||||
|
||||
if (id === targetId) {
|
||||
return null;
|
||||
|
@ -472,6 +472,7 @@ export const Debug: FC = () => {
|
||||
}
|
||||
}
|
||||
|
||||
if (metaSortKey) {
|
||||
reorderFetcher.submit(
|
||||
{
|
||||
targetId,
|
||||
@ -485,6 +486,7 @@ export const Debug: FC = () => {
|
||||
encType: 'application/json',
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
renderDropIndicator(target) {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user