Skip to content

Commit 5de84aa

Browse files
committed
[persister] Don't report error on initialContent
1 parent aefe012 commit 5de84aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/persisters/common/create.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ export const createCustomPersister = <
199199
const content = await getPersisted();
200200
if (isArray(content)) {
201201
setContentOrChanges(content);
202+
} else if (initialContent) {
203+
setDefaultContent(initialContent as Content);
202204
} else {
203205
errorNew(`Content is not an array ${content}`);
204206
}

0 commit comments

Comments
 (0)