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

why getPathsForKey removed in production #171

Closed
pYr0x opened this issue Jun 9, 2018 · 4 comments
Closed

why getPathsForKey removed in production #171

pYr0x opened this issue Jun 9, 2018 · 4 comments
Assignees

Comments

@pYr0x
Copy link

pYr0x commented Jun 9, 2018

why is this function removed in production code?
https://github.com/canjs/can-view-scope/blob/master/can-view-scope.js#L431

i got an error if i make a build.

i am not sure. but maybe this is related to donejs/autorender@720af84
i have a <x-login app:from="scope.vm"></x-login> and can tries to fetch vm with the function getPathsForKey. in production the functions is emtpy so i got this error.

steal.production.js:11 Potentially unhandled rejection [4] TypeError: Cannot read property 'vm' of undefined
    at Scope.hasKey (http://localhost:8080/dist/bundles/medicalpad/index.js:10858:30)
    at Object.hasKey (http://localhost:8080/dist/bundles/medicalpad/index.js:3694:31)
    at objHasKeyAtIndex (http://localhost:8080/dist/bundles/medicalpad/index.js:9855:89)
    at Object.read (http://localhost:8080/dist/bundles/medicalpad/index.js:9895:28)
    at Scope.read (http://localhost:8080/dist/bundles/medicalpad/index.js:10671:47)
    at ScopeKeyData.read (http://localhost:8080/dist/bundles/medicalpad/index.js:10525:39)
    at Observation.onBound (http://localhost:8080/dist/bundles/medicalpad/index.js:6756:40)
    at KeyTree.add (http://localhost:8080/dist/bundles/medicalpad/index.js:6399:40)
    at Observation.on (http://localhost:8080/dist/bundles/medicalpad/index.js:6568:27)
    at Object.eval [as onValue] (http://localhost:8080/dist/bundles/medicalpad/index.js:3122:31)

cc @phillipskevin

@justinbmeyer
Copy link
Contributor

justinbmeyer commented Jun 9, 2018 via email

@pYr0x
Copy link
Author

pYr0x commented Jun 9, 2018

@justinbmeyer
Copy link
Contributor

Why does that get called? Can you create a test of a template that would call that?

@pYr0x
Copy link
Author

pYr0x commented Jun 9, 2018

here is a demo https://github.com/pYr0x/view-scope-bug

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

No branches or pull requests

3 participants