Skip to content

Commit

Permalink
fix: mark customEventHandlers as optional (#138)
Browse files Browse the repository at this point in the history
## Description

Sorry, my PR above generates a new error as we define a default value
for customEventHandlers but at the same time it is marked as required.

Since it has a default value it does not need to be required.

So the error is easily fixed

Related error:

```
Warning: Failed prop type: The prop `customEventHandlers` is marked as required in `AdvertisingSlot`, but its value is `undefined`.
    at AdvertisingSlot (/node_modules/react-advertising/lib/components/AdvertisingSlot.js:37:17)
```
  • Loading branch information
CristianDeluxe authored Jul 11, 2024
1 parent 0d6b1b5 commit 0f4589c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AdvertisingSlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ AdvertisingSlot.propTypes = {
style: PropTypes.object,
className: PropTypes.string,
children: PropTypes.node,
customEventHandlers: PropTypes.objectOf(PropTypes.func).isRequired,
customEventHandlers: PropTypes.objectOf(PropTypes.func),
};

export default AdvertisingSlot;

0 comments on commit 0f4589c

Please sign in to comment.