Skip to content

Commit 4b25f8b

Browse files
committed
[DEV-11477] Validate layout property using isEnum
1 parent 0487897 commit 4b25f8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/content-format/src/nodes/EmbedNode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { OEmbedInfo as OEmbed } from '../common';
22
import { Element } from '../Element';
3-
import { isNonEmptyString, isUuid } from '../validation';
3+
import { isEnum, isNonEmptyString, isUuid } from '../validation';
44

55
export interface EmbedNode extends Element<typeof EmbedNode.TYPE> {
66
uuid: string;
@@ -28,6 +28,7 @@ export namespace EmbedNode {
2828
const isValid =
2929
isEmbedNode(value) &&
3030
isNonEmptyString(value.url) &&
31+
isEnum(value.layout, Layout) &&
3132
isUuid(value.uuid) &&
3233
OEmbed.isOEmbedInfo(value.oembed);
3334

0 commit comments

Comments
 (0)