Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Do not count undefined as an argument of execute. #499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tetsuya-ogawa
Copy link

@tetsuya-ogawa tetsuya-ogawa commented Jul 28, 2021

issue

When I pass payload as the 3rd argument and undefined as the 4th argument of excute,
line 504 of core.js is evaluated.

now

ReactGA.plugin.execute('ec', 'addProduct', { id: ~, name: ~ }, undefined)

then ↓

ReactGA.ga('ec', 'addProduct')

after this pr merged

ReactGA.plugin.execute('ec', 'addProduct', { id: ~, name: ~ }, undefined)

then ↓

ReactGA.ga('ec', 'addProduct', { id: ~, name: ~ })

Copy link
Contributor

@SimeonC SimeonC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting the PR! Could you add a test to make sure this is covered here https://github.com/react-ga/react-ga/blob/master/test/functionality/plugin.test.js

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants