Skip to content

Throw descriptive error when 'subscribable' of undefined #2155

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

Merged
merged 1 commit into from
Mar 17, 2019

Conversation

thgh
Copy link
Contributor

@thgh thgh commented Mar 3, 2019

Fix #2139

Should there be a test for this?

@codecov-io
Copy link

codecov-io commented Mar 3, 2019

Codecov Report

Merging #2155 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2155   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files           1        1           
  Lines          49       49           
=======================================
  Hits           45       45           
  Misses          4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 863eff9...e619de7. Read the comment docs.

@thgh
Copy link
Contributor Author

thgh commented Mar 10, 2019

Will update PR with this.error

@thgh
Copy link
Contributor Author

thgh commented Mar 12, 2019

Updated 😃

@thgh
Copy link
Contributor Author

thgh commented Mar 15, 2019

The tests are green now :-)

@Conduitry
Copy link
Member

In case we want to add more $$-prefixed variables, what we're doing elsewhere is checking that name[0] === '$' && name[1] !== '$'.

I think we probably also want to indicate in the error code/message that this is a temporary state of affairs, and that subscribing to global stores will be supported someday when we get around to it. I'm using the not-implemented code in another PR but it's not merged yet and I'm not sure that's a convention that will get off the ground.

@Rich-Harris Rich-Harris merged commit e619de7 into sveltejs:master Mar 17, 2019
@Rich-Harris
Copy link
Member

Thanks @thgh — I think @Conduitry is right that it should be possible to subscribe to global stores, so rather than improving the error I've fixed the bug in #2235.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants