Skip to content

🎥 Make videos programmatically with React

some somments etc

Jonny Burger1717aef68e10
diff --git a/packages/core/src/series/index.tsx b/packages/core/src/series/index.tsx
index e912c2c824..34fa8ccae3 100644
--- a/packages/core/src/series/index.tsx
+++ b/packages/core/src/series/index.tsx
@@ -28,6 +28,7 @@ const Series: FC & {
}
| string;
if (typeof castedChild === 'string') {
+ // Don't throw if it's just some accidential whitespace
if (castedChild.trim() === '') {
return null;
}
@@ -39,7 +40,7 @@ const Series: FC & {
if (castedChild.type !== SeriesSequence) {
throw new TypeError(
- `The <Series /> component only accepts a list of <Series.Sequence /> components as it's children but got ${castedChild}`
+ `The <Series /> component only accepts a list of <Series.Sequence /> components as it's children, but got ${castedChild} instead`
);
}
@@ -47,7 +48,7 @@ const Series: FC & {
if (!castedChild || !castedChild.props.children) {
throw new TypeError(
- `A <Series.Sequence /> component (${debugInfo}) doesn't have any children.`
+ `A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`
);
}