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

assigning certain properties to constructor will fail #22

Open
neonstalwart opened this issue Jan 4, 2012 · 0 comments
Open

assigning certain properties to constructor will fail #22

neonstalwart opened this issue Jan 4, 2012 · 0 comments

Comments

@neonstalwart
Copy link
Member

in FacetedStore there is a for loop to copy properties from facetSchema to constructor. if facetSchema contains certain properties (name, caller, length, etc) an error will be thrown in strict mode.

    for(i in facetSchema){
        constructor[i] = facetSchema[i];
    }

most of these properties are unlikely to be in a schema except that i came across this because i was using name in my schemas. should we just wrap that assignment in a try/catch to silence the errors?

    for(i in facetSchema){
        try {
            constructor[i] = facetSchema[i];
        }
        catch (e) {}
    }
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

1 participant