-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
Description
Describe the bug
I've added a listener and this error is showing.
Steps to reproduce
This is my code:
const [branchBanner, setBannerIsShowing] = useState(false);
useEffect(() => {
const initAndFetch = async () => {
const branch = (await import('branch-sdk')).default;
branch.closeJourney();
branch.init(key);
branch.track('pageview', { experiment: 'gen-banner' });
branch.setBranchViewData({
data: {
x: 'open',
y: id,
},
});
branch.addListener(JourneyEvent.didShowJourney, () => {
setBannerIsShowing(true);
});
};
if (isMobile) {
void initAndFetch();
}
}, [isMobile, id]);
Expected Behavior
There should be no error
Additional Information/Context
No response
SDK version used (window.branch.sdk)
2.58.2
Environment
chrome Version 110.0.5481.100