Fix attachment duplication on add

This commit is contained in:
Maksim Eltyshev
2020-04-23 05:56:02 +05:00
parent dc66a93e18
commit cb2f795ef1
8 changed files with 36 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
import { createSelector } from 'redux-orm';
import orm from '../orm';
// eslint-disable-next-line import/prefer-default-export
export const attachmentWithIdExistsSelector = () =>
createSelector(
orm,
(_, id) => id,
({ Attachment }, id) => Attachment.idExists(id),
);

View File

@@ -3,4 +3,5 @@ export * from './all';
export * from './path';
export * from './current';
export * from './by-id';
export * from './boolean';
export * from './next-position';