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

String.prototype.valueOf is not generic #42

Open
jameshartig opened this issue Mar 19, 2015 · 1 comment
Open

String.prototype.valueOf is not generic #42

jameshartig opened this issue Mar 19, 2015 · 1 comment

Comments

@jameshartig
Copy link

If you're making weak references to String objects then it can no longer behave like a string:

var string = weak(new String('test'));
string == 'test'; //throws String.prototype.valueOf is not generic

Is this a known limitation?

@jameshartig
Copy link
Author

This is related to #13. A way to get around it is to pass around the weak reference but when you actually need the original object use weak.get(ref).

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