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

adobeDataLayer.push fails when some older versions of RequireJS already exist on page #102

Closed
charltoncraig opened this issue Sep 29, 2020 · 0 comments · Fixed by #114
Closed
Labels
bug Unexpected problem or unintended behavior that impairs normal functioning.
Milestone

Comments

@charltoncraig
Copy link

Expected Behaviour

adobeDataLayer.push({'abc':1}) should append {'abc':1} to the adobeDataLayer queue

Actual Behaviour

Uncaught TypeError: isPlainObject is not a function
at getType (adobe-client-data-layer.js:547)
    at module.exports (adobe-client-data-layer.js:540)
    at adobe-client-data-layer.js:225
    ...

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Navigate to about:blank
Paste into the console and execute:

var scriptElement = document.createElement('script');
scriptElement.src = "https://requirejs.org/docs/release/2.1.9/minified/require.js"
document.body.append(scriptElement);

Paste into the console and execute (above code block must execute first):

window.adobeDataLayer =  [];
var scriptElement = document.createElement('script');
scriptElement.src = "https://unpkg.com/@adobe/[email protected]/dist/adobe-client-data-layer.js";
document.body.append(scriptElement);

Paste into the console and execute:
adobeDataLayer.push({'abc':1})

Platform and Version

Chrome Version 85.0.4183.102

Sample Code that illustrates the problem

Logs taken while reproducing problem

@charltoncraig charltoncraig changed the title adobeDataLayer.push fails with older versions of RequireJS adobeDataLayer.push fails when some older versions of RequireJS already exist on page Sep 29, 2020
@gabrielwalt gabrielwalt added the bug Unexpected problem or unintended behavior that impairs normal functioning. label Oct 1, 2020
jckautzmann pushed a commit that referenced this issue Feb 16, 2021
…S already exist on page

Replace keyword require by acdlreq to avoid conflicts with requirejs
@jckautzmann jckautzmann added this to the 2.0.0 milestone Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior that impairs normal functioning.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants