Don't add a newline at the end of empty story string

This commit is contained in:
Cohee 2023-10-18 11:44:45 +03:00
parent cc3e27eca1
commit 5d1fff3df6
1 changed files with 1 additions and 1 deletions

View File

@ -1242,7 +1242,7 @@ export function renderStoryString(params) {
output = output.trimStart();
// add a newline to the end of the story string if it doesn't have one
if (!output.endsWith('\n')) {
if (output.length > 0 && !output.endsWith('\n')) {
output += '\n';
}