Skip to content

Commit

Permalink
fix: update document validation (#788)
Browse files Browse the repository at this point in the history
* fix: document creation validation

* fix: validation schema for add new doc to have a non-required value
  • Loading branch information
LinaYahya authored Sep 13, 2023
1 parent d0add75 commit 09a317e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/utils/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Item,
ItemType,
getAppExtra,
getDocumentExtra,
getEmbeddedLinkExtra,
} from '@graasp/sdk';
import { ImmutableCast, ItemRecord } from '@graasp/sdk/frontend';
Expand Down Expand Up @@ -119,11 +118,6 @@ export const isItemValid = (item: Partial<DiscriminatedItem>): boolean => {
hasValidTypeProperties = isUrlValid(url);
break;
}
case ItemType.DOCUMENT: {
const { content } = getDocumentExtra(item.extra) || {};
hasValidTypeProperties = Boolean(content && content.length > 0);
break;
}
default:
break;
}
Expand Down

0 comments on commit 09a317e

Please sign in to comment.