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

Problem with function compileMappings, and how i (might have) fixed it. #98

Open
LeytonC opened this issue Feb 17, 2013 · 0 comments
Open

Comments

@LeytonC
Copy link

LeytonC commented Feb 17, 2013

Hello, i have just had an issue with using plates on my Mac OSX version of node (v0.8.9). I am not sure if this would be an issue for everyone, but cannot see a problem like this already issued, but i thought i would mention it.

Every time i ran my node program (simple webserver), loaded a html file and .bind it with a map and data it would work perfectly. 2nd time i loaded it, with a refresh i would get the error

Error: Conflicting mappings for attribute {attribute name} and value {value}

the problem seems to be caused by the slice method called in compileMappings, its missing the second parameter limiting the number of elements returned. I added the extra parameter to limit to a valid mapping so it could be sorted, and i added an shift() after the sort method to remove the map i just processed.

I am not sure if this does fix the problem, as i am not 100% familiar with the code base, and i have not really run it against lots of test cases. I really wanted to see what everyone thought.

Thanks for help and insights in advance
(If anything else like code is needed, please just ask.)

Leyton.

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