Describe the bug
I'm getting the error Cannot read property 'end' of null
when using the {:then} without a variable.
To Reproduce
<script>
let promise;
</script>
{#await promise}
Loading...
{:then}
Loaded!
{/await}
Expected behavior
No error.
Screenshots
Additional context
Output:
Error walking node {
start: 35,
end: 83,
type: 'AwaitBlock',
expression: Node {
type: 'Identifier',
start: 43,
end: 50,
loc: SourceLocation { start: [Position], end: [Position] },
name: 'promise'
},
value: null,
error: null,
pending: {
start: 51,
end: 61,
type: 'PendingBlock',
children: [ [Object] ],
skip: false
},
then: {
start: 61,
end: 75,
type: 'ThenBlock',
children: [ [Object] ],
skip: false
},
catch: {
start: null,
end: null,
type: 'CatchBlock',
children: [],
skip: true
}
}
nice one. i put out a request for first time contributors as this is a good first issue. happy to help whoever tries to tackle this.
Hey there 👋
I've started looking into this and have raised a pull request #189.
Thanks @skippednote ! Fix should be available in about 12 hours.
Most helpful comment
Thanks @skippednote ! Fix should be available in about 12 hours.