Closed gladchinda closed 4 years ago
First, I did not understand why you did not use the callback: that's why the plugin is made for... And why did you not just put a noop as first param? I close this as the first parameter is required, and I do not want to make it optionnal.
When constructing the
CookiesEuBanner
instance, it is possible that the argument passed as thelaunchFunction
named parameter may not be a function.For any of the above scenarios, the code will throw a
TypeError
indicating that the designatedlaunchFunction
is not a function.Hence, a type check is required to ascertain that the
launchFunction
is a function. And if not, a no-op function can be used as a fallback.