Skip to content

Commit

Permalink
fix: prevent draw prop from getting lumped in with Pixi props
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Jun 14, 2024
1 parent 64bc403 commit af1ac9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/applyProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function applyProps(instance, data)

localState.eventCount = Object.keys(localState.handlers).length;
}
else if (key !== 'draw')
else
{
currentInstance[key] = value;
}
Expand Down
7 changes: 7 additions & 0 deletions src/helpers/createInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ export function createInstance(type, props, root)
}

const {
// react props
children,
key,
ref,

// @pixi/react props
draw,

...pixiProps
} = props;

Expand Down

0 comments on commit af1ac9b

Please sign in to comment.