Skip to content
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

REPL bug caused by dynamicAttributes? #46

Closed
mrkishi opened this issue Nov 30, 2016 · 1 comment
Closed

REPL bug caused by dynamicAttributes? #46

mrkishi opened this issue Nov 30, 2016 · 1 comment
Labels

Comments

@mrkishi
Copy link
Member

mrkishi commented Nov 30, 2016

The REPL's output view is not updated when the selected gist is changed.

This seems to be caused because the compiler generates the following code for the Element:

update: function(changed, root) {
	var codeMirror_changes = {};
	if ('undefined'in changed) {
		codeMirror_changes.code = root.compiled.code;
	}
	if (Object.keys(codeMirror_changes).length) {
		codeMirror.set(codeMirror_changes);
	}
}

Apparently, the dynamicAttributes end up with undefined dependencies for deep object paths.

I'm afraid I haven't been able to dive deep enough to attempt a PR, yet. Sorry! But if you have any directions and feel like this would be a productive first contribution, I can certainly try. 👍

@Rich-Harris
Copy link
Member

Ah whoops! It's supposed to resolve the top-level property that corresponds to the deep path, but must be failing – off the top of my head, I would probably start here to try and understand why the dependencies aren't being resolved correctly. If it gets hairy though, even a reduced test case (like these) would be hugely appreciated. Thanks!

mrkishi added a commit to mrkishi/svelte that referenced this issue Dec 4, 2016
Rich-Harris added a commit that referenced this issue Dec 4, 2016
Fix typo in generator's contextualise; solves #46
@mrkishi mrkishi closed this as completed Dec 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants