-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error: NotFoundError: DOM Exception 8 in {{#each}} #762
Comments
This is a guess, but maybe import App from './App.html';
new App({
target: document.querySelector('.does-not-exist')
}); Can happen if the selector contains a typo. Compiling with |
I was able to reproduce this on the REPL actually (Firefox, if that matters), but I don't have time right now to dig into it. |
In the screenshot The component itself renders fine initially, this only happens at the |
Repro (also in Chrome v60): https://svelte.technology/repl?version=1.29.1&gist=b8e1568c2c7d28ddb171f02ef560ba70 |
I lied, I ended up digging into this very slightly - when a new value for for ( var i = each_block_iterations.length; i < each_block_value.length; i += 1 ) {
each_block_iterations[i] = create_each_block( state, each_block_value, each_block_value[i], i, component );
each_block_iterations[i].mount( div, null );
} We're not calling |
Inserting a |
It's slightly unusual to have an each block that doesn't use the actual data, which I suspect is why it hasn't come up already. I've put @Conduitry's fix in a PR — #764 |
call create() on new iterations of static each blocks
Uncaught Error: NotFoundError: DOM Exception 8
, stack trace:The relevant code looks like
items
is initially[]
, then it'sthis.set({items: someArray})
.I tried to reproduce in the REPL but it works there. (Managed to repro in the REPL)
Browser: Chrome v27
Svelte: v
1.29.1
Sorry I realise this bug report is not 100%, what other info would be helpful?
The text was updated successfully, but these errors were encountered: