Skip to content

Commit

Permalink
fix empty typewriter containing two lines
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Oct 15, 2023
1 parent caee719 commit d66546a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/level.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ function PlayableLevel({impressum, setImpressum}) {
let code = editor.getModel().getLinesContent().filter(line => line.trim())
editor.executeEdits("typewriter", [{
range: editor.getModel().getFullModelRange(),
text: code.join('\n')+'\n',
text: code.length ? code.join('\n') + '\n' : '',
forceMoveMarkers: true
}]);

Expand Down

0 comments on commit d66546a

Please sign in to comment.