-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
The bug happens in the following circumstance:
A site uses requirejs for loading js (called parent site). In this parent site third party javascript snippets are used. The third party scripts (i.e. js based polls, popups, counters, ...) have no access to the requirejs loading environment of the parent site.
js-cookie is used in such a third party script. Because the third party script does not know in which environment js-cookie is loaded, they should use the noConflict method. That works well if the parent site does not use requirejs. However if the parent site uses requirejs, the noConflict method throws an error because it is not exported.
This issue is very similar to #234 .
Expected behavior
js-cookie allows noConflict under all circumstances, even if the host site uses requirejs.