Silent failure if the view starts with a space or newline
Closed this issue · 3 comments
chancyk commented
AppRun seems to silently produce nothing if there's a space or newline before the first element in the view. I noticed this initially when using the backtick string form, e.g.:
return `
<div>
<div>hello</div>
<div>world</div>
</div
`
The code below produces the issue for me on AppRun version 1.13.8 and Chrome 67:
<html>
<head>
<script src="https://unpkg.com/apprun@1.13.8/dist/apprun-html.js"></script>
</head>
<body>
<div id="app-content">
</div>
<script>
const state = {};
const view = state => {
return ' <div>hello</div>';
};
const update = {
};
app.start('app-content', state, view, update);
</script>
</body>
</html>
yysun commented
Confirmed. I will release a fix tonight.
yysun commented
It has been fixed in 1.13.9
chancyk commented
Confirmed fixed. Thanks!