affiliate
affiliate copied to clipboard
[Affiliate] TypeError: e.set is not a function
Hi @russellsteadman,
I'm implementing now Affiliate
and AffiliatePluginAmazon
with the intention to use the new aff.convert()
method, added in v5 after our last thread here: https://github.com/russellsteadman/affiliate/issues/31#issuecomment-1374914260
However, as I'm putting it all together in my React app, I noticed it is throwing me out an error in the console when the aff.convert()
method is called.
I'm adding below parts of the relevant Affiliate
and AffiliatePluginAmazon
code for a greater context of what I have running over here that produce this error.
// ...
import Affiliate from "affiliate";
import AffiliatePluginAmazon from "affiliate-plugin-amazon";
// ...
const amazonAff = AffiliatePluginAmazon(Affiliate, {
tags: {
us: "amzapplink-20", // for USA, required
gb: "", // for UK
de: "", // for Germany
fr: "", // for France
jp: "", // for Japan
ca: "", // for Canada
cn: "", // for China
it: "", // for Italy
es: "", // for Spain
in: "", // for India
br: "", // for Brazil
mx: "", // for Mexico
},
debug: false, // verbose logging into the console, default off
locale: null, // manually set the country code of the browser, default automatic
modifyDomain: true, // modify domains like amazon.com to amazon.co.uk based on locale, default on
});
// ...
// Testing convert function.
console.log(amazonAff.convert("https://www.amazon.com"));