-
Notifications
You must be signed in to change notification settings - Fork 42
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
Using Activator broke native ES6 functions #56
Comments
Well, that certainly isn't good! @IvanMMM can you share a simple example code (gist or just pasted in here) that triggers it? And can you link to the Styliner issue? |
const arr = [{a:1},{a:2},{a:3}];
console.log(arr.find.toString()); //=>> function find() { [native code] }
const activator = require('activator');
activator.init({
user:{},
transport:{},
from: `...`,
templates:activator.templates.file(__dirname+'/../../templates'),
signkey:'...',
id:'_id',
emailProperty:'email',
sendPasswordResetComplete:true
});
console.log(arr.find.toString());
/*
function (value, equals) {
equals = equals || this.contentEquals || Object.equals;
for (var index = 0; index < this.length; index++) {
if (index in this && equals(this[index], value)) {
return index;
}
}
return -1;
}
*/ As you can see, first console.log displays native ES6 search function and second displays patched function. |
I don't get it. How does the above break? If I run it, it exits (because we didn't
|
Hm. And here's my log
|
Same thing if I use node |
And |
I am going to clean out my |
OK, now I got it. My prior You indicated you know the cause? |
Yes. Look like guys tried to fix it, but... |
But your sample doesn't use styliner, does it? |
And the patches there indicate that it was fixed in styliner 1.0.0? |
Key issue is here In the meantime, forcing styliner to be |
Pushed out as 3.0.2. I don't love being forced back to precisely styliner |
Great! Thank you :) |
This is caused by Styliner module dependence called 'collections'. Looks like they tried to fix it, but no results for now.
The text was updated successfully, but these errors were encountered: