Skip to content

Commit fa974ec

Browse files
chrislofloehopper
authored andcommitted
Fix prop type validation warning in SpriteSelectorItem
In ./src/containers/costume-tab.jsx:271 the SpriteSelctorItem `dragPayload` prop is set to be an object. To supress the prop type warning, I've added `propTypes.object` to the array of allowed types.
1 parent 2bb6725 commit fa974ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/containers/sprite-selector-item.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ SpriteSelectorItem.propTypes = {
151151
asset: PropTypes.instanceOf(storage.Asset),
152152
costumeURL: PropTypes.string,
153153
dispatchSetHoveredSprite: PropTypes.func.isRequired,
154-
dragPayload: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
154+
dragPayload: PropTypes.oneOfType([
155+
PropTypes.string,
156+
PropTypes.number,
157+
PropTypes.object
158+
]),
155159
dragType: PropTypes.string,
156160
dragging: PropTypes.bool,
157161
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),

0 commit comments

Comments
 (0)